Jump to content
Software FX Community

CustomGridLine limit to Single Pane?


Krayol
 Share

Recommended Posts

I have a chart with many CustomGridLines to indicate the position of specific identified events. We also have a number of Panes to indicate different data sources.

I would like to identify the event using a colored vertical line on a single pane (not through all the panes). Is this possible?

If not, is there another means to achieve the same effect?

Link to comment
Share on other sites

Thanks Andre,

It is a real time chart and functions have previously been added to maintain, clear and redraw all the lines after each refresh/scroll although I appreciate that this impacts performance quite a lot.

While I can create AnnotationArrows at the relevant position using annotation.Attach(dx, dy), I need to retrieve the value for dx.

The sample application (X-Axis is date) iterates over the Data.X series and returns the first matching value. However, it appears that in my RealTime chart, the Data.X series is empty (Data.X.HasData returns false, Data.X[0] etc. throws Exception).  Is there another way to get the X-Axis point from the actual X-values

Link to comment
Share on other sites

Yes, that's I believe so, although I'm new to this.  I started with the RealTime example project supplied, then replaced the tick event with a sandbox method as follows:

private void timer1_Tick(object sender, EventArgs e){  cumulativePointCount++;  if (pointCount < nTotalPoints) pointCount++;  else  {    if (pointCount == nTotalPoints)    {     if (radioButton4.Checked)      chart1.RealTime.Mode = RealTimeMode.Scroll;    pointCount++;    } }

  //Insert some predictable 'ramp' data  chart1.RealTime.BeginAddData(1, RealTimeAction.Append);  chart1.Data[0, 0] = (cumulativePointCount % 25) / 100.0 + 2.1;  chart1.RealTime.EndAddData(radioButton4.Checked, true);

  //Attempt to use through X series  var points = chart1.Data.Points; // This returns 181  var hasData = chart1.Data.X.HasData; // This always return false  var exceptionThrown = chart1.Data.X[0, 0]; // This always throws ArgumentOutOfRangeException}

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...