1

I use Chartkick Ruby library to create some pie charts. I want the chart to show some specific text on each part of the pie tooltips but the library show its value instead. I managed to specify colors for parts like this:

<%= pie_chart {First: 1, Second: 2, Third: 3}, colors: ['red', 'green', 'blue']>

But I don't want the chart show values on tooltips (now it is showing 1, 2 and 3 accordingly), I need it to display some strings like "One, "Two", "Three". I was trying all three JS libraries (ChartJS, Google Charts, Highcharts) but with no luck. How can I achieve my goal?

chernish2
  • 113
  • 1
  • 9

1 Answers1

0

Refer this issue in chartkick github repo this is not supported in chartkick as of now but he might add this in future

Hey @dominicsanto, this isn't possible right now, but on the top of my list of desired features.

But this is possible in native chartjs you can easily do it using callback see here for detailed answer

Rahul Sharma
  • 1,393
  • 10
  • 19