User (Legacy) Posted September 3, 2004 Report Share Posted September 3, 2004 Hi, I'm trying to access the Sections collection of a Chart from MouseDown event handler in a JavaScript script to permit a WebUser to highlight a chart area, whith no results. In general I am able to capture client side events and set Chart properties, but I can't access Section objects contained in "Sections" collection. Any one knows how can I do? How do I can set a color, background color for instance, where in C# code I would use, for instance, System.Color.Yellow? Here is a sample of the scripts I'm using: <script language="javascript" > var selMin = 0; var selMax = 0 </script> <script language="javascript" event="MouseDown( nButton,nClicks,nHitType,x,y,nSeries,nPoint,obj )" for="Chart1" > selMin = - (x / Chart1.AxisX.PixPerUnit * Chart1.AxisX.Step ); </script> <script language="javascript" event="MouseUp( nButton,nClicks,nHitType,x,y,nSeries,nPoint,obj )" for="Chart1" > selMax = - ( x / Chart1.AxisX.PixPerUnit * Chart1.AxisX.Step ); </script> <script language=javascript event=PostPaint(w,h,objGraphics) for=Chart1> Chart1.AxisX.Sections[0].From = selMin; Chart1.AxisX.Sections[0].To = selMax; Chart1.AxisX.Sections[0].BackColor = 0xeeeeee; </script> Attachments.zip Attachments.zip Link to comment Share on other sites More sharing options...
Software FX Posted September 8, 2004 Report Share Posted September 8, 2004 The JAVA Script syntax will be: Chart1.AxisX.Sections.Item(0).From = 2; Chart1.AxisX.Sections.Item(0).To = 4; Chart1.AxisX.Sections.Item(0).Gridlines = true; -- FP Software FX Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.