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

Feature request: emit events #17

Closed
ImreC opened this issue Aug 21, 2017 · 3 comments
Closed

Feature request: emit events #17

ImreC opened this issue Aug 21, 2017 · 3 comments

Comments

@ImreC
Copy link

ImreC commented Aug 21, 2017

Hi,

I gave vue-chartkick a spin the last couple of days and so far it works great. However, what really would be a great feature for me is that when you click any of the chart parts it would emit an event. In that way you can also easily build charts that respond on clicks (for example, add a filter on a certain part of the data when you click that piece of the pie). Thanks for this module!

Cheers

@ImreC
Copy link
Author

ImreC commented Aug 21, 2017

Did some additional research. Apparently chartjs offers an built in onclick event which emits most of the data required. See answer here. https://stackoverflow.com/a/41870115/4462086. Having this as a standard emitted event in Vue would just offer an enormous range of extra possibilities with vue-chartkick.

@ankane
Copy link
Owner

ankane commented Oct 30, 2017

Hey @ImreC, thanks for the suggestion 👍 You can pass options to Chart.js with the library option. See the readme for how to use it.

@ankane ankane closed this as completed Oct 30, 2017
@Raystar2312
Copy link

Hi,
I am currently facing the same issue. I would like to call a function when I click on a marker on the Geo Chart.
Has this functionality been implemented since ?

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

No branches or pull requests

3 participants