mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-06 12:19:08 +02:00
Update the docs to reflect the new feature
This commit is contained in:
parent
e949edacf5
commit
fd2344dd5f
@ -137,6 +137,8 @@ myDoughnutChart.update();
|
||||
|
||||
Calling `addData(segmentData, index)` on your Chart instance passing an object in the same format as in the constructor. There is an optional second argument of 'index', this determines at what index the new segment should be inserted into the chart.
|
||||
|
||||
If you don't specify a color and highliht, one will be chosen from the global default array: segmentColorDefault and the corresponding segmentHighlightColorDefault. The index of the addded data is used to lookup a corresponding color from the defaults.
|
||||
|
||||
```javascript
|
||||
// An object in the same format as the original data source
|
||||
myDoughnutChart.addData({
|
||||
|
Loading…
Reference in New Issue
Block a user