Skip to content
Snippets Groups Projects
Commit 559ce505 authored by Anurag Vats's avatar Anurag Vats
Browse files

Refactor chart label

parent 2ef69a5e
No related branches found
No related tags found
3 merge requests!25Draft: Resolve #78,!7fixUrlPath,!4merge dev into main
...@@ -99,7 +99,7 @@ export class DashboardComponent implements OnInit { ...@@ -99,7 +99,7 @@ export class DashboardComponent implements OnInit {
this.chart.destroy(); this.chart.destroy();
this.readings = { this.readings = {
labels: res.map((reading: any) => this.getReadableDate(reading.timestamp)), labels: res.map((reading: any) => this.getReadableDate(reading.timestamp)),
title: this.sensorsData?.find((sensor: any) => sensor.name === sensorId)?.name, title: res[0].readings[0].name,
data: res.map((reading: any) => reading.readings[0].value) data: res.map((reading: any) => reading.readings[0].value)
}; };
this.drawChart(); this.drawChart();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment