Crosshair values
Crosshair values
Hello, I was wondering whether it is any how possible to get the Y value from the series plotted, for a given DomainCrosshair? I don't particularly want to use the CrosshairOverlay, as I use my custom defined plot, where I have a grid of XY charts on a single ChartPanel, and I need the crosshairs defined for each chart in that grid.
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Re: Crosshair values
The DatasetUtilities class has the following method that returns the y-value for a given x-value:
Code: Select all
public static double findYValue(XYDataset dataset, int series, double x);
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program