You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello. For one project I'm working on(vuejs + chart.js), I've made chart to be displayed, for the number of sensors fetched from DB.
Charts are created in built in method in vue - onMounted.. which successfully give separate chart objects.
Because I want all of the charts to have common style, I'm passing same configuration object (chartData) per chart.
'function createChart(ctx) {
And the Problem is when i try to update the charts, with chart.data.datasets[0].data.push(value); it appears that "value" is added to all of the charts, not to the single chart of the sensor.
It looks like all charts using same datasets[0].data. which is not good.
Thanks in advance for help or idea how to fix. :)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello. For one project I'm working on(vuejs + chart.js), I've made chart to be displayed, for the number of sensors fetched from DB.
Charts are created in built in method in vue - onMounted.. which successfully give separate chart objects.
Because I want all of the charts to have common style, I'm passing same configuration object (chartData) per chart.
'function createChart(ctx) {
And the Problem is when i try to update the charts, with chart.data.datasets[0].data.push(value); it appears that "value" is added to all of the charts, not to the single chart of the sensor.
It looks like all charts using same datasets[0].data. which is not good.
Thanks in advance for help or idea how to fix. :)
Beta Was this translation helpful? Give feedback.
All reactions