fixing history.

pull/228/head
Jason Kulatunga 4 years ago
parent 8a46931399
commit 694fc74ca0

@ -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
}
]
}

Loading…
Cancel
Save