chartConfig.addSeriesConfig(scatterCfg);
// chart data
InvientCharts chart = new InvientCharts(chartConfig);
XYSeries seriesData = new XYSeries("User Supplied Data");
seriesData.addPoint(new DecimalPoint(seriesData, 20, 20));
seriesData.addPoint(new DecimalPoint(seriesData, 80, 80));
chart.addSeries(seriesData);
chart.addListener(new ChartClickListener() {
@Override
public void chartClick(ChartClickEvent chartClickEvent) {
logEventInfo("chartClick",
((DecimalPoint) chartClickEvent.getPoint()).getX(),
((DecimalPoint) chartClickEvent.getPoint()).getY(),
chartClickEvent.getMousePosition().getMouseX(),
chartClickEvent.getMousePosition().getMouseY());
XYSeries xySeries = (XYSeries) chartClickEvent.getChart()
.getSeries("User Supplied Data");
xySeries.addPoint(new DecimalPoint(xySeries,
((DecimalPoint) chartClickEvent.getPoint()).getX(),
((DecimalPoint) chartClickEvent.getPoint()).getY()));
}
});