if (action.equals("mouseover")) {
if (chartRenderingInfo==null) return false;
XYPlot plot = (XYPlot)chart.getXYPlot();
PlotRenderingInfo info = chartRenderingInfo.getPlotInfo();
Rectangle2D dataArea = info.getDataArea();
if (dataArea.contains(x, y)) {
plot.setRangeCrosshairVisible(true);
plot.setDomainCrosshairVisible(true);
String msg = "";
// set the crosshair value for the horizontal axis...
ValueAxis da = plot.getDomainAxis();
if (da != null) {
double hvalue = da.translateJava2DToValue(x, info.getDataArea(),plot.getDomainAxisEdge());
plot.setDomainCrosshairValue(hvalue,false);
String label = da.getLabel();
if ((label!=null) && (!label.equals(""))) msg += label;
else msg+= resources.getString("X");
msg += "=" + AxisLabelFormatter.labelFormat(hvalue);
}
// set the crosshair value for the vertical axis...
ValueAxis ra = plot.getRangeAxis();
if (ra != null) {
double vvalue = ra.translateJava2DToValue(y, info.getDataArea(),plot.getRangeAxisEdge());
plot.setRangeCrosshairValue(vvalue,false);
if (!msg.equals("")) msg+=" ";
String label = ra.getLabel();
if ((label!=null) && (!label.equals(""))) msg += label;
else msg+= resources.getString("Y");