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 Quote 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. Quote 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 > > Quote 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.