List of usage examples for org.jfree.chart.fx ChartCanvas getScaleY
public final double getScaleY()
From source file:net.sf.mzmine.chartbasics.ChartLogicsFX.java
/** * Find chartentities like JFreeChartEntity, AxisEntity, PlotEntity, TitleEntity, XY... * //from www.j a v a2s .co m * @param chart * @return */ public static ChartEntity findChartEntity(ChartCanvas chart, double mx, double my) { // TODO check if insets were needed // coordinates to find chart entities int x = (int) (mx / chart.getScaleX()); int y = (int) (my / chart.getScaleY()); ChartRenderingInfo info = chart.getRenderingInfo(); ChartEntity entity = null; if (info != null) { EntityCollection entities = info.getEntityCollection(); if (entities != null) { entity = entities.getEntity(x, y); } } return entity; }