Sorry, we do not have a ready made example that does what you describe.
You should be able to use a MouseInputListener object derived from DataCursor. The point p ends up with the physical coordinates of the mouse cursor at mouse pressed and mouse released.
public class CustomChartDataCursor2 extends DataCursor {
public CustomChartDataCursor2(ChartView achartview, CartesianCoordinates thetransform,
int nmarkertype,
double rsize)
{
super(achartview, thetransform, nmarkertype, rsize);
}
// override mouseReleased method in order to add stuff
public void mousePressed(MouseEvent event)
{
super.mousePressed(event);
ChartPoint2D p = getLocation(ChartObj.PHYS_POS);
}
// override mouseReleased method in order to add stuff
public void mouseReleased (MouseEvent event)
{
super.mouseReleased(event);
ChartPoint2D p = getLocation(ChartObj.PHYS_POS);
}
}
.
.
.
CustomChartDataCursor2 dataCursorObj = new CustomChartDataCursor2( gWG, pTransform1,
ChartConstants.MARKER_NULL, 8.0);
dataCursorObj.setDataCursorEnable(true);
dataCursorObj.addDataCursorListener();