CircularInstance.addData was incorrect

addData takes a single object of type CircularChartData, not an array. Also the index is optional. See addData example in the documentation http://www.chartjs.org/docs/#doughnut-pie-chart-prototype-methods
This commit is contained in:
Slimfit
2015-04-11 11:13:27 -04:00
parent b04ad99e8b
commit 262cd5c3fc

2
chartjs/chart.d.ts vendored
View File

@@ -113,7 +113,7 @@ interface LinearInstance extends ChartInstance {
interface CircularInstance extends ChartInstance {
getSegmentsAtEvent: (event: Event) => {}[];
update: () => void;
addData: (valuesArray: CircularChartData[], index: number) => void;
addData: (valuesArray: CircularChartData, index?: number) => void;
removeData: (index: number) => void;
}