I have a Angular 5 page that is trying to use your package to draw a simple Pie chart. The data is all set after rendering, and the data seems to update just fine, but when I try to generate and set the labels array, every label shows up as undefined. I have debugged to check the array is getting loaded correctly, but it seems like with labels on Pie / Donut charts, only a statically set array of labels at declaration works. Changing the label array (even creating a new array and resetting the class member) fails to render any labels on the standard mouseover / hover tooltip.
Any suggestions appreciated.
I noticed this is an issue on #774. When can we expect a fix?
Any news?. I have the same problem.
The post below on that page worked for me. It's a work around, but it
worked.
John K.
On Wed, Jan 31, 2018 at 12:36 PM, Nacho notifications@github.com wrote:
Any news?. I have the same problem.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/valor-software/ng2-charts/issues/951#issuecomment-362009998,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFYx0OhQy3do9o6ITHfi7SGF2wLiI_y4ks5tQKSSgaJpZM4Rt2DX
.
Closed by ef5d2f4
try this i have try it with bar chat but process is same just customize according to your code.
[datasets]="ChartData"
//...other stuff >
and in the component I have a function which update the chart with new data, and then I clone the datasets and re-assign it
drawChart(){
this.ChartData=[{data: this.dataX, label: 'X'}]; // this.dataX has new values from some place in my code
//nothing happened with my chart yet, until I add this lines:
let clone = JSON.parse(JSON.stringify(this.ChartData));
this.ChartData=clone;
//other stuff like labels etc.
}
Most helpful comment
The post below on that page worked for me. It's a work around, but it
worked.
John K.
https://github.com/valor-software/ng2-charts/issues/774#issuecomment-298263293
On Wed, Jan 31, 2018 at 12:36 PM, Nacho notifications@github.com wrote: