FVANCOP / ChartNew.js

MIT License
420 stars 142 forks source link

Highlight with multiple charts in one canvas #430

Open jamesbenns opened 8 years ago

jamesbenns commented 8 years ago

Thanks everybody for this amazing script.

I have a problem when using highLight: true, for multiple charts in the same canvas. When a chart is hovered on, one chart disappears. The function works as it should on the second chart and it still shows annotations as if the other chart was there - even highlighting that set but on the other chart.

I am trying to create a two layer doughnut chart, so one chart is positioned directly above the other within the canvas, perhaps this something to do with the issue alongside the fact that the chart is rewritten every time highLight is called.

Thanks in advance!

FVANCOP commented 8 years ago

Hi,

Thanks for using ChartNew.js !!!

Multiple charts on a single canvas is something that is not really supported. I found how to produce such a chart and the code has been adjusted to make it work. Updating such a chart is not possible. As you mention, HighLight option use the update function ; that's why it does not work for multiple chart. I'm convinced that several options do not work for multiple chart (even animation is not working well).

You have to see multiple chart has a fixed picture that you can produce.

Perhaps that you can get the same result with a code similar to what you will found in Samples/responsiveChart.html.

Regards, François