Jump to content
Software FX Community

Change Series Orientation


Recommended Posts

Hey Frank,

Thank for the quick reply!

I tried what you suggested but Im getting an error.  Heres a snippet of my code.

 On Timer tick:

  'Plot on Chart
  'Switch real-time styles once buffer is full
  If nOffset = BufferSize Then
  dataChart.RealTimeSettings.Style = SoftwareFX.ChartFX.RealTimeStyle.NoWaitArrow
  dataChart.Refresh()
  End If

  ''Set Communication Channel styles
  ''These COD values instruct Chart FX about the Realtime settings
  ''the chart, values and legend.
  Dim nCOD As SoftwareFX.ChartFX.COD
  nCOD = SoftwareFX.ChartFX.COD.XValues Or SoftwareFX.ChartFX.COD.RealTime
  nCOD = nCOD Or SoftwareFX.ChartFX.COD.ScrollLegend

  ''Add a point for each sereis to the right of the chart
  ''Using the legend property, set the legend values

  dataChart.OpenData(COD.XValues Or COD.AddPoints, 2, 1)

  dataChart.XValue(1, 0) = dataPoint
  dataChart.Legend(0) = Str(nOffset + 1)
  dataChart.CloseData(nCOD)
  nOffset = nOffset + 1

 

The Error:

System.NullReferenceException was unhandled
  Message="Object reference not set to an instance of an object."
  Source="ChartFX"
  StackTrace:
at SoftwareFX.ChartFX.DataArray.get_Item(Int32 index)
at SoftwareFX.ChartFX.17.BeginLoop()
at SoftwareFX.ChartFX.17.I3(IGraphicsEx 1N5)
at SoftwareFX.ChartFX.Chart.DS(17 1CH, IGraphicsEx 1CI, Rectangle& 1CJ, Int32& 1CK)
at SoftwareFX.ChartFX.Chart.DR(PaintBar 1CE, IGraphicsEx 1CF, Rectangle& 1CG)
at SoftwareFX.ChartFX.0X.OnPaint(PaintEventArgs e)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at WeatherBalloonOperatorInterface.frmMDIContainer.Main() in C:\Project\Inco\WeatherBalloon\WeatherBalloonOperatorInterface\frmMDIContainer.vb:line 20
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
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.

×
×
  • Create New...