Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[swtchart-dev] PieChart: series.getPieSliceFromPosition

Hi Himanshu,

one more thing: I try to use ICircularSeries#getPieSliceFromPosition, but it does not resolve the right values. To me it looks like the value resolution is horizontally flipped... if I press the mouse at the top of the doughnut, I get values from the bottom of the doughnut and vice versa.

chart.getPlotArea().getControl().addMouseListener(MouseListener.mouseUpAdapter(e -> {
    ICircularSeries<?> series = (ICircularSeries<?>) chart.getSeriesSet()
                    .getSeries(Messages.LabelStatementOfAssetsHoldings);
    Node node = series.getPieSliceFromPosition(e.x, e.y);
    System.out.println(node.getId());
}));


Andreas.

Back to the top