Jump to content
Software FX Community

Couple little realtime chart issues.


Recommended Posts


 I'm working with a realtime chart, and I'm having 2 small issues I can't seem to figure out.

 1. When the graph starts... everything is fine... but as soon as the autoscroll kicks in the graphed line starts 'jerking' left and right with every graphupdate call. This happens whether I'm looking at previous points in the graph or watching the data as it comes in. The entire chart jerks back and forth. Any idea what could be causing this? If needed I could probably post a short video.

 2. My second issue is this: When I 'beginadddata' to the realtime graph, if I add data in this way... nothing shows up: (setting x/y for each point)

Chart1.Data.Y(0, 0) = weightChart1.Data.X(0, 0) = CInt(time)

Instead the only way I can get the graph to work is to do this: (which only sets the y values)

Chart1.Data(0, 0) = weight

I'm logging and controlling the x axis time value myself, and they do not always increment evenly. Here is the charts setup code, and the update call.


Chart1.ExtraStyle = Chart1.ExtraStyle And Not ChartStyles.CacheImage

Chart1.ExtraStyle = Chart1.ExtraStyle Or ChartStyles.DoubleBuffer

Chart1.Data.Series = 1

Chart1.RealTime.BufferSize = 0

Chart1.RealTime.Mode = RealTimeMode.Scroll

Chart1.RealTime.LoopMarker.Color = Color.Red


Chart1.Series(0).Color = Color.Red

Chart1.Series(0).Line.Width = 2



Chart1.AxisY.Min = 0

Chart1.AxisY.Max = 20000

Chart1.AxisY.ScaleUnit = 1

Chart1.AxisY.Step = 5000



Chart1.AxisX.PixelsPerUnit = 6

Chart1.AxisX.LabelsFormat.Format = AxisFormat.None

Chart1.AxisX.Style = (Chart1.AxisX.Style Or AxisStyles.HideText)



// This is called every 100ms from a timer event. (obviously, you can see the commented code. I only call either one or the other. (the X/Y update or just the single data Y update))

Chart1.RealTime.BeginAddData(1, ChartFX.WinForms.RealTimeAction.Append)

Chart1.Data(0, 0) = weight

'Chart1.Data.Y(0, 0) = weight

'Chart1.Data.X(0, 0) = CInt(time)

Chart1.RealTime.EndAddData(False, False) 


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.

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.

  • Create New...