Lack of Timeline.DateRangeListener in Charts 3

In Charts 2 there was Timeline component with DateRangeListener which was called each time when user modifies the selected date range by moving the date range selector.
Unfortunatelly, in Charts 3 I can not find such possibility to listen to date range selection. Now the timeline is embeded into charts. But charts don’t have similar liteners.
Is there some workaround for that?

Hi Igor,

That feature is now covered with the XAxesExtremesChangeListener. Event min and max are Number so com.vaadin.addon.charts.util.Util.toServerDate is needed if you want to work with Date objects.

chart.addXAxesExtremesChangeListener(new XAxesExtremesChangeListener() { @Override public void onXAxesExtremesChange(XAxesExtremesChangeEvent event) { Date min = Util.toServerDate(event.getMinimum().doubleValue()); Date max = Util.toServerDate(event.getMaximum().doubleValue()); //use min and max //... } }); Hope this helps,

Guille