Jump to content
Software FX Community

Overflow exception occuring on a realtime chart


binford
 Share

Recommended Posts

Hi,

Id like to display a strip chart which is plotting sinus values against time values. After a few seconds I get an overflow exception. Besides that, there is nothing drawn on the chart control. The code the designer created is the following:

this.chartFX.AllSeries.MarkerShape = ChartFX.WinForms.MarkerShape.None; this.chartFX.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.chartFX.AxisX.Grids.Major.Style = System.Drawing.Drawing2D.DashStyle.Solid; this.chartFX.AxisX.Title.Text = "X Axis"; this.chartFX.Location = new System.Drawing.Point(3, 243); this.chartFX.Name = "chartFX";this.chartFX.Size = new System.Drawing.Size(492, 74); this.chartFX.TabIndex = 9;

Then I did some basic initialization stuff:

chartFX.RealTime.BufferSize = 10; chartFX.RealTime.Mode = RealTimeMode.Scroll; chartFX.RealTime.FastScroll = false; chartFX.Data.Series = 1; chartFX.AxisX.LabelsFormat.Format = AxisFormat.Date; chartFX.AxisY.LabelsFormat.Format = AxisFormat.Scientific;

The part within the timer event looks like this. I gets called every 100ms:

chartFX.RealTime.BeginAddData(1, ChartFX.WinForms.RealTimeAction.Append); chartFX.Data.Y[0, chartFX.Data.Points - 1] = sinus; chartFX.Data.X[0, chartFX.Data.Points - 1] = newMeasureTime.ToOADate(); chartFX.RealTime.EndAddData(true, false);

Any help is appreciated. Im really stuck on that issue.

Link to comment
Share on other sites

  • 1 month later...

Hi binford

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

 

 

Software FX has created many samples you can download from our website.   There are 1 samples showing what you want to achieve, please select "RealTime Chart" in "Choose sample" area, at top of the page.

 

Please check them at: http://demo.softwarefx.com/chartfx/aspnet/ajaxsamples/.   You will have the option to download the source code.

 

If you continue with some kind of issue, please contact Software FX Support at support[at]softwarefx.com.

 

-- Pipon

 

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...