chartkick icon indicating copy to clipboard operation
chartkick copied to clipboard

Setting options in AJAX requests

Open georgeu2000 opened this issue 9 years ago • 4 comments

How to set tooltips?

georgeu2000 avatar Aug 05 '16 20:08 georgeu2000

Hey @georgeu2000, I'm not sure there's a way to do this now, but happy to discuss how to make this possible.

ankane avatar Aug 06 '16 20:08 ankane

OK, I dug deeper and found that I can pass options directly to the chart control using library key. However, this doesn't make sense in my use case because it is an AJAX request. So, I would want to pass the tooltips in with the chart data, not when the chart html is generate.

I think the solution is to be able to pass arbitrary data to the chart control, regardless of whether it is an AJAX request.

georgeu2000 avatar Aug 08 '16 19:08 georgeu2000

@georgeu2000 We could add a new format to allow for options to be passed in AJAX requests, like:

render json: {data: data, min: 0, library: {...}}

ankane avatar Aug 09 '16 02:08 ankane

The async feature is completely useless when you have multiple series with custom names on them. Huge +1 for this enhancement to be implemented.

rozhok avatar Aug 12 '18 10:08 rozhok