How to debug and troubleshoot
Sooner or later during charting application development user may notice that something is not right. Either chart produce unexpected visualization, show some exception or application even crash. It could be various reasons for those problems and this page describe how to troubleshoot them.
How to create multithreaded chart applications
Getting an application to run smoothly using background threads can really make a big difference.
How to limit zooming/panning to specific Axis value
There is no property, which could limit Axis range, but you can use event handler to control it.
How to create Axis labels with scientific notation
Scientific notation is a way of expressing numbers, which commonly used by scientists, mathematicians, and engineers. This base 10 notation, where nonzero numbers are written in the form
Cartesian Chart - how to create?
It maybe trivial question for some, but not that obvious for others. If you found yourself in latter category, we are here to untangle that question.
How to rotate chart (ViewXY)?
Y- and X-axes similar, but not the same. In particular, stacking could be done only for YAxes and scrolling/sweeping is only for XAxis. LightningChart is design such way that Xaxis is always horizontal and progressive order of x-values is required for most of line-series.
How to measure Annotation
Annotation has many properties which controls its size and location (e.g. AnnotationXY ). Annotation can be dragged to different position on the screen and it can be resized. Also text inside of Annotation can be change at any time. While in most cases user don't need to worry and rendering will be done automatically, sometimes user may want to know size and location of Annotation. For some settings answer is very trivial (e.g. if AnnotationXYSizing == AxisValuesBoundaries). However, it is less obvious when other settings are used.
How to resize MeshModel?
MeshModel scale (scaling factor) is controlled by Size property. For example,
Creating app for ARM-device
Windows has traditionally run on machines that are powered by x86 / x64 processors, but more recently, also runs on devices powered by Arm processors.
Updating from older version
LightningChart components API may have been changed from an older version, after which the project may not load or use the new version automatically. These instructions show how to set the new version assemblies as a reference to a project and how to fix the properties that were unable to de-serialize in the Visual Studio form editor.
How customize DataCursor's ResultTable?
From version 12.4 DataCursor can have customizable content of ResultTable. In particular, after subscribing to DataCursor. ChangeResultContent event, user can use event handle to create a composite format string, which will be used instead of default table. As much as composite format string allows, user can define which values to show in ResultTable, with what precision and how to arrange items (e.g. padding, alignment, multi-lines).
How to draw rectangle (ViewXY)?
Sometimes there a need to draw rectangle on the chart with mouse-cursor. The purpose may be to select points in the range or just modify zoom behavior.
How to set correct pixel alignment?
In case, application subscribes/listens to LightningChart ChartMessage, the WPF application may raise events related to 'pixel alignment'.
How to limit point count (ViewXY)?
While it is possible to add more and more points to chart or line-series almost indefinitely, at some stage it will become impractical and starts to consume too much memory. Especially true for long running real-time/streaming application, where the main interest is to observe/visualize the latest points. Therefore, it is a good idea to have point limiting strategy implemented in the streaming application.
Line series tips
Here is the list of tips to improve performance. Typically, there is trade-off between performance improvement and other features, or some extra requirement for the data is attached. Therefore, user should balance all the needs carefully.
Intensity series tips
Applies to: IntensityGridSeries, IntensityMeshSeries
D Orthographic view tips
Use View3D.Camera.Projection = Orthographic instead of OrthographicLegacy for maximum performance. Difference can be seen especially when zooming the view while having lots of series and data in it (see 3D Camera).
D surface series tips
Applies to: SurfaceGridSeries3D, SurfaceMeshSeries3D, WaterfallSeries3D
Maps tips
Applies to: ViewXY.Maps
Hardware tips
To get the absolute maximum performance for a LightningChart application, the computer hardware must be powerful. In many applications, display adapter power is more important than CPU power. Use as modern display adapter as possible. DirectX 9.0c level display adapters work. ‘c’ comes from DirectX Shader Model 3, which is required by some effects.
Using LightningChart in C++ applications
LightningChart is a .NET library which can be most fluently used with C# and VB.NET language. However, it is possible to use LightningChart in C++ Win32 applications as well, including MFC applications. The application using LightningChart must be compiled with Common Language Runtime Support (/clr) option. When creating a Windows Form Project using C++, refer to the detailed step by step tutorial below.