diff --git a/README.md b/README.md index e9b3cca..2bd77f3 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ Official [API documentation][1] can be found on [LightningChart][2] website. If the docs and other materials do not solve your problem as well as implementation help is needed, ask on [StackOverflow][3] (tagged lightningchart). -If you think you found a bug in the LightningChart JavaScript library, please contact support@lightningchart.com. +If you think you found a bug in the LightningChart JavaScript library, please contact sales@lightningchart.com. Direct developer email support can be purchased through a [Support Plan][4] or by contacting sales@lightningchart.com. @@ -55,8 +55,8 @@ Direct developer email support can be purchased through a [Support Plan][4] or b © LightningChart Ltd 2009-2022. All rights reserved. -[XY cartesian chart]: https://lightningchart.com/js-charts/api-documentation/v5.0.1/classes/ChartXY.html -[Line series]: https://lightningchart.com/js-charts/api-documentation/v5.0.1/classes/LineSeries.html -[Data patterns]: https://lightningchart.com/js-charts/api-documentation/v5.0.1/interfaces/DataPattern.html +[XY cartesian chart]: https://lightningchart.com/js-charts/api-documentation/v5.1.0/classes/ChartXY.html +[Line series]: https://lightningchart.com/js-charts/api-documentation/v5.1.0/classes/LineSeries.html +[Data patterns]: https://lightningchart.com/js-charts/api-documentation/v5.1.0/interfaces/DataPattern.html [Progressive trace data generator]: https://arction.github.io/xydata/classes/progressivetracegenerator.html diff --git a/src/index.js b/src/index.js index 90d1702..c5be799 100644 --- a/src/index.js +++ b/src/index.js @@ -44,7 +44,7 @@ chart chart .getDefaultAxisX() .setTitle('milliseconds') - .setInterval({ start: 0, end: 2500, stopAxisAfter: false }) + .setDefaultInterval((state) => ({ end: state.dataMax, start: (state.dataMax ?? 0) - 2500, stopAxisAfter: false })) .setScrollStrategy(AxisScrollStrategies.progressive) // Points that are used to generate a continuous stream of data.