User (Legacy) Posted February 26, 2003 Report Share Posted February 26, 2003 Hi All, (ChartFX IE5.5) I need to get the position of cursor as "value". I write the following code. It works well for y but not for x. I have used PaintInfo because PixelToValue can't be used in javascript but the documentation says that CPI_PIXELTOVALUE is obsolete and there is no documentation about it. <SCRIPT LANGUAGE="JavaScript" FOR="ChartFX1" EVENT="LButtonDblClk(x, y, nSerie, nPoint, nRes)"> var lX var lY var temp = ChartFX1.PaintInfo(5, CHART_ML(x, y)) lX = CHART_LOWORD(temp); lY = CHART_HIWORD(temp); alert(lX + " " + lY) </SCRIPT> Can anyone help me please? Gianluca Link to comment Share on other sites More sharing options...
Software FX Posted February 27, 2003 Report Share Posted February 27, 2003 PaintInfo with CPI_PIXELTOVALUE can not be used from JavaScript either as the parameters require pointers. What exactly do you need to do with this script ? maybe we can find another way of doing it. -- FP Software FX, Inc. Link to comment Share on other sites More sharing options...
Software FX Posted February 27, 2003 Report Share Posted February 27, 2003 When you use PaintInfo with CPI_PIXELTOVALUE we return a double with the value of the specified pixel in the "current" axis (default is Y axis), so your code needs to be something like <SCRIPT LANGUAGE="JavaScript" FOR="ChartFX1" EVENT="LButtonDblClk(x, y, nSerie, nPoint, nRes)"> <!-- var yValue = ChartFX1.PaintInfo(5, CHART_ML(x, y)) ChartFX1.CurrentAxis = 2 var xValue = ChartFX1.PaintInfo(5, CHART_ML(x, y)) ChartFX1.CurrentAxis = 0 alert(xValue + " , " + yValue) --> </SCRIPT> -- Regards, JC Software FX Support "Gianluca" <gianluca.maggio@cezannesw.com> wrote in message news:nXqjEOb3CHA.1844@webserver1.softwarefx.com... > Hi All, > > (ChartFX IE5.5) > > I need to get the position of cursor as "value". > I write the following code. It works well for y but not for x. > > I have used PaintInfo because PixelToValue can't be used in javascript but > the documentation says that CPI_PIXELTOVALUE is obsolete and there is no > documentation about it. > > <SCRIPT LANGUAGE="JavaScript" FOR="ChartFX1" EVENT="LButtonDblClk(x, y, > nSerie, nPoint, nRes)"> > var lX > var lY > var temp = ChartFX1.PaintInfo(5, CHART_ML(x, y)) > lX = CHART_LOWORD(temp); > lY = CHART_HIWORD(temp); > alert(lX + " " + lY) > </SCRIPT> > > Can anyone help me please? > > Gianluca > > Link to comment Share on other sites More sharing options...
Software FX Posted February 27, 2003 Report Share Posted February 27, 2003 Oops ! My mistake. JC, see JC's posting. -- FP Software FX, Inc. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.