Skip to main content
Version: 5.2.1

XY features rework (Beta)

We at LightningChart Ltd. are currently in the process of updating our most important features - the core XY data visualization functionalities.

The current status of this project is public beta. Starting with LightningChart JS v5.1.0, the latest previews of the next XY feature iteration are available with the library. In LightningChart JS v6.0.0 the old features will be completely replaced.

This is a massive refactoring, with an incredibly long list of improvements. These are all the result of gathering user feedback over several years and identifying points of improvement for the future - and now, finally realizing them.

List of improvements

Performance

  • Massively increased maximum data capacity.
    • able to load line charts with up to ~30x more data than before.
  • Massively improved memory efficiency.
    • up to 3000x less JS heap size usage than before.
  • Massively reduced Garbage Collection load in real-time applications.
    • Before GC ticks were a performance bottleneck in the most extreme applications out there.
  • Massively upgraded performance of beta equivalents for PointLineSeries, StepSeries, SplineSeries and AreaSeries, bringing them to the level of LineSeries and further.
  • Massively improved CPU efficiency of appending data points into beta equivalent for PointSeries.
    • up to 62x less CPU utilization than before.
  • Massively reduced latency when zooming into large progressive data sets.
    • Enables, for example, having a massive 10 million data point visualization and simply mouse wheeling into full zoom level without any visible lag.
  • Significantly improved ZoomBandChart loading time and memory efficiency.
    • up to 10x faster loading time when displaying large data sets in ZoomBandChart.
  • Significantly improved loading time of XY features.
    • line and scatter charts ~3x faster load time on average.
    • area, spline, step charts ~600x faster load time on average.
  • Significantly improved CPU efficiency of XY features with streaming data updates.
  • Significantly improved efficiency of consuming binary data / Typed arrays.
  • Significantly improved efficiency of consuming separate number[] arrays of X and Y values.
  • Significantly improved efficiency of consuming JSON data where property names are not exactly x and y.
    • Utilizing new method gives opportunity for significant performance boost in most existing applications. See Append JSON for more information
  • Significantly improved performance of appending samples 1 at a time vs user having to group them in an array and feed all at once.
    • Frequent performance problem with customers.
  • Significantly improved performance of LUT.percentageValues in real-time scatter series use cases.
  • Added ability to display same data set in several series or charts without having to duplicate the data.
  • Added ability to supply per-sample colors as 32 bit integers vs heavy Color objects. Significantly improves performance and max data capacity in use cases with per-sample colors.

New features

  • Added data edit API. Existing samples can be edited by sample index or user specified id property.
    • Frequently requested by customers.
  • Added data read-back API. Data pushed to charts can be conveniently read back for any application specific purpose.
    • Frequently requested by customers.
  • Added ability to efficiently request currently visible data set from a graph.
    • Frequently requested by customers.
  • Added ability to optionally manage XY data sets separately from Series. This can have powerful advantages in specific use cases, such as changing axis type between linear/logarithmic without having to reload data set - just recreate the series, which is really fast. More details.
  • Added Spline Area Series.
  • Added Step Area Series.
  • Added per data point color Line Series.
  • Added per data point color Area Series.
  • Added per data point color Spline Series.
  • Added per data point color Step Series.
  • Added value lookup colored Area Series.
  • Added ability to further reduce memory consumption by specifying internal data storage format (64 bit, 32 bit, 16 bit, 8 bit, ...).
  • Added ability to specify hard max sample count for XY series. This clearly specifies the maximum memory allocation for the charts which can be crucial in certain applications.
  • Added ability to switch between Step / Spline / Area / Line / Point Line / Point visualizations at any point during run-time without any performance impact.
  • Added ability to switch between point shape at any point during run-time.
  • Added possibility for automatic data cleaning for Point Series
    • e.g. keep max 1 million points in memory

Quality of life

  • Added built-in feature to sort incoming data to progressive time order automatically vs user having to do it.
  • Added automatic Area baseline (fill area all the way down from curve vs some hardcoded baseline Y value).
  • Makes it significantly easier to create sweeping charts (as opposed to scrolling), by using data edit API.

User experience

  • Axis fitting now considers only visible data, rather than entire out of view history (progressive data patterns only).
    • Frequently requested by customers.
  • Added automatic hiding of points/markers when zoomed out, and displaying with animated opacity when zooming in.

Bug fixes

  • Fixed zoomed out LineSeries displaying data gaps (NaN) incorrectly as connected lines.

Learn more

Explore the key topics around the new XY features here:

While these new features are in beta, they will receive rapid patch version updates if any bugs are found/reported. They are recommended for integration even to customer production. The current known limitations are mainly niche use cases that will be added later for the final release, such as:

  • RegressiveX data pattern (scrolling left)
  • Vertical data patterns (scrolling up / down)