Releasing the X-axis after calling Chart.zoom(): a step-by-step guide
P粉323050780
P粉323050780 2024-04-04 23:40:56
0
1
1303

I set the scroll strategy tosetScrollStrategy(AxisScrollStrategies.progressive)and on the loaded page the chart scrolls very fast because my data is coming in very quickly. However, I solved this problem by usingchart.zoom({ x: -200, y: 180 }, { x: 500, y: 500 })to set a certain zoom when the chart starts, and then the chart Doesn't automatically scroll the X axis is no longer there, what function should I call to release the axis without having to double click on the X axis?

Another problem is that I don't understand how the data is cleaned, at first I expectedseries.setDataCleaning({ minDataPointCount: 1000 })to clean the data points that are more than 1000 and invisible, but Iconsole .log( series.getPointAmount())I noticed the total points went over 1000 I let it run for a while but it still didn't clean up? I calculated the total duration of the data I need on a time series chart and the result is 120k data points, how should I ensure that I always have at least 120k points on the chart while cleaning up old data points that don't need to be rendered? < /p>

P粉323050780
P粉323050780

reply all (1)
P粉939473759

In setScrollStrategy(AxisScrollStrategies.progressive): -- The axis will keep the distance between start and end constant and scroll to show series boundaries above the active axis interval.

But you can use Axis's setInterval property to manually set its interval so that it doesn't load too fast.

Axis.setInterval(0, 100)

You can also pass some other parameters in setInterval, for example: -

disableScrolling: If true, disables automatic scrolling after setting the interval

animate: Boolean value to enable animation, or number of animation duration in milliseconds

setInterval(start: number, end: number, animate: number | boolean | undefined, disableScrolling: boolean | undefined): this
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!