How to extend ChartSelectionEvent

I need to use the following code to get clientX and clientY once users select some area on Vaadin chart:

	chart.addChartSelectionListener(new ChartSelectionListener() {

        @SuppressWarnings("unused")
		@Override
        public void onSelection(ChartSelectionEvent event) {
				double x = event.getClientX();                //There is no such method in current implementation.
		}
	}

How do I extend ChartSelectionEvent? Doesn’t It work once I extend it?

Thanks,

James

Firstly, you need to capture this info in the client-side GWT ChartSelectionEvent (meaning com.vaadin.addon.charts.client.ui.ChartSelectionEvent, not com.vaadin.addon.charts.ChartSelectionEvent). Then you need to update the onSelectionRpc() method in the ChartServerRpc interface to allow passing the information to the server side. To match that change, you need to change the onStateChanged method in ChartConnector. Finally, you need to update the ChartServerRpcImplementation in Chart.java (to get the info from the RPC) and update the server-side ChartSelectionEvent to host the new info.

You’ll need to rebuild the widgetset (and the Charts project) for the client-side changes to take effect, mind you.

-Olli

Thank to [everyone]
(https://kissanime.software/) on this [thread]
(https://groupme.onl/) had this question and needed [solution]
(https://letgo.onl/).