'Update the first chart in vue-chartjs
I am having two pie charts, but changes applies only to the last one even if they have different canvas id
here is the html code I used to add them
<Pie
:chart-options="chartOptions1"
:chart-data="chartData1"
:chart-id="chartId1"
:dataset-id-key="datasetIdKey1"
:plugins="plugins1"
:css-classes="cssClasses1"
:styles="styles1"
:width="width1"
:height="height1"
/>
<Pie
:chart-options="chartOptions"
:chart-data="chartData"
:chart-id="chartId"
:dataset-id-key="datasetIdKey"
:plugins="plugins"
:css-classes="cssClasses"
:styles="styles"
:width="width"
:height="height"
/>
As you can see they have different configs, datas, Ids ... but the problem is that updates apply only to the last pie chart
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|