mardi 30 avril 2019

How to put 2 labels and distinct tooltips from two bars

I'm trying to put two more features on this chart.

At the bottom, the graph displays the 12 months of the year with two bars for each month. One is that of the current year and the other of last year. I would like each bar is its own label to be able to display for example: April 2019 and next april 2018

And then I block on the tooltips. The still when one passes the mouse they display the information of the current year and those of the preceding year. The problem is at the level of the total where it displays the totoal of the two years.

On my side I try to display only the total of the bar where is the mouse. In summary the total for 2019 passing the mouse on the bar of 2019 and the total of 2018 passing on that of 2018.

My fiidle :

jsfiddle.net/gcr8z257/3/



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire