Open RobinRamael opened 6 years ago
Hello @RobinRamael 👋
Chartist has recently been updated to version 1.0
with some new exciting changes like ESM and TypeScript support. The migration guide can be found right here.
Please let me know if the quiestion is still relevant to you so we can further look into it!
I'm not a JS developer and this is not my code and it's incredibly messy, so please bear with me :)
We have a react-chartist component that uses the
onDraw
listener to fill in some tooltip data for a multi bar chart showing age/gender demographics. The tooltips seem to have been reversed: data from series 'Man' has the label from series 'Woman' and vice versa.When looking at the data the listener received, it looks like the two have been swapped somehow:
As you can see,
data.value
does not appear anywhere indata.series.data
, as it is a datapoint for the 'Man' series and we've received the 'Woman' series. We get our tooltip label fromdata.series.name
, so it appears reversed.Am I right to assume that
data.series
should point to the current series being drawn? Any idea what I could be overlooking? Thanks!