Limitations on Maximum Zoom Depth

Viewed 111

I'm attempting to use LightningChartJS to manage a large number of datapoints (300,000+), while also supporting zoom levels down to a couple datapoints. My data is time series, and I have not been able to find any type of X Axis that will operate as expected in this scenario.

At full view, 8 hours of data should be visible. At the deepest zoom, I'd like to be able to distinguish between single microseconds. This means I'd like to be able to add X Axis points between 0 and 28,800,000,000 and have a major axis tick of 1.

This sounds like a large number, but Javascript's double-precision numerics should be able to represent a minimum of 15 digits of precision, and I only need 11.

It appears LightningChart artificially limits the zoom level based on the maximum point added to an axis. Using the 1 Million Points interactive example out of the box, I am able to zoom to the point of 1 major axis tick.

enter image description here

However if I plot between 10,000,000 and 11,000,000, I am only able to zoom to a major axis tick of 100.

enter image description here

Notably, if I divide the numbers by 1,000,000 and expect to work with high-precision small decimals instead, the precision at the maximum zoom level is identical. The limitation really is calculated somewhere in the code.

I would really like to avoid dicing up my data, scaling and sliding it upon each interval adjustment to fit into these seemingly artificial requirements. Am I missing a solution outside of that approach?

1 Answers

You are correct in that there is an artificial zoom limit involved. This is required to prevent visual errors in the rendering engine.

The zoom limit is entirely based on the minimum and maximum axis interval.

As of yet, there is no solution to this other than to manually offset the input data to start near zero.

EDIT: Since LC JS v.3.1 new high precision Axis type has been added, which allows zooming to individual nanoseconds precision.

Information about the feature can be found here https://www.arction.com/lightningchart-js-api-documentation/v3.1.0/interfaces/axisoptions.html

Related