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

PointClickListener doesn't return any information in Drilldown chart #448

Open
anasmi opened this issue Jul 25, 2017 · 1 comment
Open

Comments

@anasmi
Copy link

anasmi commented Jul 25, 2017

Adding pointClickListener to Drilldown chart doesn't return back any useful information for user.

Calling
chart.addPointClickListener(event -> { System.out.println(event.getCategory()); });

returns the index of drilldown series if the drillSeries is clicked. There is no possibility to get any more information based on it.

Tested with vaadin charts 3.2.1

@alvarezguille
Copy link
Member

I did some research about this, and it seems if the point has drilldown there is no PointClickEvent by design, and that client-side doesn't have enough information at the moment to generate the correct PointClickEvent details for the click on the second level (leaf points).

If the use case requires an event for every point click one option is to use lazy drilldown as shown in Column with Native Lazy Drilldown demo, this approach allows getting a DrilldownCallback each time a point with drilldown is clicked, and for points with no drilldown a PointClickEvent event will be triggered with the correct pointIndex and series allowing something like ((DataSeries) event.getSeries()).get(event.getPointIndex())) to get the clicked point info

I'll leave the issue open as the PointClickEvent info is incorrect if Drilldown is not lazy.

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

2 participants