Closed alarrosa14 closed 6 years ago
As far as I know, you can't pass an object that includes functions in as props with React, so not possible with Chartkick React.
@ankane I may have explained myself poorly.
I have the tooltip.pointFormatter
function working perfectly fine inside the library
prop. The thing is that I would like to have extra data available to be shown in the tooltip. This is totally possible in Highcharts by simply adding this data to the series.data
object, alongside with the chart data.
The issue is that I cannot find a way to do this using the data
prop; every data that's not name
or the chart data per-se seems to be ignored by React-ChartKick and is not set to the points. Is it posible to use library
prop to pass data into the chart, ignoring the data
prop?
My bad. Your first explanation is good, but think I misread it. Also, good to know that React supports this. Chartkick has its own data format (separate from Google Charts, Highcharts, and Chart.js), and there's not a way to pass extra data with it. Still trying to figure out the best way to do tooltips across all platforms. A callback-based approach works well for JS libraries, but hoping to come up with something that also works for Ruby and Python libraries.
Hi @ankane, is there any update for ruby on above ?
In Highcharts, you can load extra data to the points in a series.
This is very useful to customize tooltips:
I can't find a way to do this using react-chartkick. Any suggestions?