silken_solitude Posted May 5, 2008 Report Share Posted May 5, 2008 How to I change the series orientation? I would like to plot my data on the X axis as opposed to the default y axis. e.g. dataChart.Value(1, 0) = 32 plots 32 on the y axis. I would like to plot 32 on the X axis. Quote Link to comment Share on other sites More sharing options...
Frank Posted May 5, 2008 Report Share Posted May 5, 2008 dataChart.Value(1, 0) is the Y-Value, dataChart.XValue(1, 0) is the X-Value. Quote Link to comment Share on other sites More sharing options...
silken_solitude Posted May 6, 2008 Author Report Share Posted May 6, 2008 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() Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.