diff --git a/webapp/frontend/src/app/modules/detail/detail.component.ts b/webapp/frontend/src/app/modules/detail/detail.component.ts index eaf5b7c..df396b6 100644 --- a/webapp/frontend/src/app/modules/detail/detail.component.ts +++ b/webapp/frontend/src/app/modules/detail/detail.component.ts @@ -235,12 +235,20 @@ export class DetailComponent implements OnInit, AfterViewInit, OnDestroy { //chart history data if (!attr.chartData) { - var rawHistory = (attr.history || []).map(hist_attr => this.getAttributeValue(hist_attr)).reverse() - rawHistory.push(this.getAttributeValue(attr)) - attr.chartData = [ + + + var attrHistory = [] + for (let smart_result of smart_results){ + attrHistory.push(this.getAttributeValue(smart_result.attrs[attrId])) + } + + // var rawHistory = (attr.history || []).map(hist_attr => this.getAttributeValue(hist_attr)).reverse() + // rawHistory.push(this.getAttributeValue(attr)) + + attributes[attrId].chartData = [ { name: "chart-line-sparkline", - data: rawHistory + data: attrHistory } ] }