Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

copy tooltip property to mergedOptions #111

Closed
wants to merge 1 commit into from
Closed

copy tooltip property to mergedOptions #111

wants to merge 1 commit into from

Conversation

ryenus
Copy link

@ryenus ryenus commented Apr 20, 2014

I've also encountered issue #107 and this change fix it for me.

@ryenus
Copy link
Author

ryenus commented Apr 20, 2014

BTW, I think highcharts-ng is a really great plugin that fills the gap between angularjs and highcharts.

Besides this tooltip issue, I also have other ones I'm not yet able to fix/workaround yet, including:

  1. dual yAxis not working, did some hack that the label of the second yAxis can show up but not the labels.
  2. exporting options now showing either.

But what really bugs me is that it seems that the config object has a different structure compared the native options object for genuine HighCharts, and I have trouble to make it work in quite a few cases. Any chance to make the 2 the same?

@pablojim
Copy link
Owner

Thanks for the feedback @ryenus

I'm glad you find the plugin useful. You are right there is still lots of work to do.

The tooltips should work as is see: http://jsfiddle.net/pablojim/vR22N/3/ Note: The tooltip property needs to be in the options object - I'll try explain why below.

dual yAxis not working, did some hack that the label of the second yAxis can show up but not the labels.

Yep this is a needed enhancement - it shouldn't be too hard to fix. There may be some common logic in handling mulitple axes and handling multiple series. i'll get to it at some point in the meantime pull requests accepted!

exporting options now showing either.

This should work - post a jsfiddle and an issue if after reading al this you still can't get it to work.

But what really bugs me is that it seems that the config object has a different structure compared the native options object for genuine HighCharts, and I have trouble to make it work in quite a few cases. Any chance to make the 2 the same?

I think this seems to be the main issue you are facing. Basically the options are split into 2 -mthings that highcharts provides an api for updating and things that you have to refresh the whole chart to update.

e.g. title, axes, series all have highchart functions to update them on an existing chart. Hence they live outside the main options object and then can be watched separately by AngularJS. Tooltip configuration can't be changed on an existing chart so it is left in the the main options object. When anything here changes the whole chart is refreshed. If highcharts introduced a new api e.g. chart.updateToolips then I'd move it.

See #15 for more explanation.

Let me know also how the docs can be made clearer. The example object in the readme already has tooltip configuration but this seems to often be missed!

Hope this explains things and helps a bit. Feel free to open more issues if you find them - including jsfiddles if possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants