score:2
This will not work. Because the reactiveMixins assume that chartData
is the whole chartjs dataset object. With the dataset array, with the labels etc.
But you are splitting it up, this way the reactiveMixins can't work. Because your chartData is only the pure data of one dataset.
To solve it, you can do two things:
- Pass in the whole dataset object
- Add own watchers.
I guess the most simple method would be to add two watchers to watch chartData
and chartLabel
and on a change call this.$data._chart.update()
Source: stackoverflow.com
Related Query
- vue-chartjs reactive data error
- Unexpected error when attempting to update chart data in Chart.js, in a Vue app
- Implementing Data Decimation in vue chartjs
- Can I use a custom data format when using Vue + Chartjs
- Angular Chartjs How to make it reactive to data change?
- Chartjs in Vue integrate parsed Json Data
- ChartJS have xAxes labels match data source
- "Maximum call stack size" Error When Adding Data to Chartjs Using Props With Fetch (Vue/Chartjs)
- ChartJs error in displaying my array data
- Two chartjs charts on page throwing data undefined error
- Calling data from outside of Chartjs code
- Reproduce Error in Chartjs v2 Polar chart not plotting all supplied data
- 'require is not defined' error when attempting to use chartjs in javascript code
- Rest Api data fetching error while using chartjs
- Chartjs Bar Chart showing old data when hovering
- ChartJS - Different color per data point
- Chartjs random colors for each part of pie chart with data dynamically from database
- ChartJS - Draw chart with label by month, data by day
- Displaying JSON data in Chartjs
- Chartjs v2 - format tooltip for multiple data sets (bar and line)
- react-chartjs-2 with chartJs 3: Error "arc" is not a registered element
- TimeSeries scale in ChartJS 3.0.2. brings error "This method is not implemented: either no adapter can be found or an incomplete integration was ..."
- Chartjs hide data point labels
- chartjs + Angular6 is not showing charts or any error
- Updating chartJS with dynamic data
- ChartJS show gaps in time data
- Chartjs 2 scaling lots of data points
- dump missing date in data for chartjs
- Reactive Vue Chart.js component using Typescript
- Show data dynamically in line chart - ChartJS
More Query from same tag
- Resize chart.js canvas for printing
- Setting specific color per label in chart.js
- How to display legend in toolbox in Charts.js?
- Chart.js -> Displaying % on pie chart
- ChartJS distribute points evenly
- Remove bullet points from chart.js legend
- Stepped line with null values in chart.js
- ChartJS - How to change color of some data points in graph
- chart.js and asynchronous loading
- chart.js wide bar with time scale
- Add buffer to Y axis with chart js
- error TS2322: Type 'string' is not assignable to type 'keyof ChartTypeRegistry'
- How to create rounded bar graph with Angular 7 and Chartjs (v2)
- How can I make a stepline or stepped chart in chart.js or D3?
- how to set title in legend of chart.js?
- Chart.JS Time Axis Not Parsing
- Vue pie chart show after a while (like show console with a warning)
- Chart.js data/label scale
- Invalid module name in augmentation. Module 'chart.js' resolves to an untyped module at '/src/chart.js', which cannot be augmented
- ChartJS Bar Graph Gap
- angular chart js set fill color of bar chart
- Two data sets with different time instances on the same ChartJs chart
- Bar Graph, chart.js PHP Will Not Load
- Chartjs: How can I group datasets closer if I have maxBarThickness set?
- Is it possible to add more attributes to segement in a Doughnut chart of Chart JS?
- Drawing chart.js with external JSON
- I want to add label on only specific vue chart
- Combining multiple legend elements in chart.js
- Line Charts color all greyed out (ng2-charts)
- How to Sum values from different objects in Django?