Cursor Tool
Posted: Mon Oct 07, 2013 4:22 pm
I Initialize the cursor Tool:
When the user clicks on the graph (mouseClicked MouseEvent), then I enable the cursor tool:
The issue that I'm having is that the vertical cursor line does not appear when the user clicks on the chart, but only after the user moves the mouse. Is there any way that the vertical line can show up upon a mouse click instead of a mouse movement once it's enabled?
Thanks
Code: Select all
cursorTool = new CursorTool(this.getChart());
cursorTool.setActive(false);
cursorTool.setFollowMouse(true);
cursorTool.setStyle(CursorToolStyle.VERTICAL);
cursorTool.getPen().setStyle(DashStyle.SOLID);
Code: Select all
if(!cursorTool.getActive())
{
cursorTool.setXValue(e.getX());
cursorTool.setActive(true);
}
Thanks