ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  how to know in which chart is the mouse
Posted by fpinero on Jul-01-2014 04:11
Hello,

Is there any way to find out over which chart is the mouse? I mean, in a financial chart I
have the main ohcl chart and two indicators. I've put an horizontal line with a label
updating the price when I move up or down the mouse, but if I move the mouse out of the
main chart, and go to one of the indicators charts, the label shows incoherent numbers.
I would like to show the label only when the mouse is over the main chart.
I've seen the examples with track lines but in all of them there is only the main chart, so
it is not necessary to figure out in which chart is the mouse.

Can someone give me an idea on how could i achieve this?

Thank You very much.

  Re: how to know in which chart is the mouse
Posted by fpinero on Jul-01-2014 17:53
I've been able to do it getting the top and bottom of the mainchart and comparing those
values with the current position of the mouse.

PlotArea plotarea = mainChart.getPlotArea();
int topY = plotare.getTopY();
int bottomY = plotarea.getBottomY();

viewer.getPlotAreaMouseY();

Thanks.