gpt4 book ai didi

lightningchart - 区域范围系列的 setDataCleaningThreshold

转载 作者:行者123 更新时间:2023-12-04 07:42:06 24 4
gpt4 key购买 nike

我在 3.00 版中看到有一个叫做 setDataCleaningThreshold 的东西,你能说出它的好处吗,我认为它是为了更快地加载渐进式图表。

const dcThreshold = xVal - 100;
lineSeries.setDataCleaningThreshold(dcThreshold);
AreaRangeSeries.setDataCleaningThreshold(dcThreshold); // not working
但它不适用于区域范围系列。
Area range Series 中也有 setMaxPointCount ,两者有什么区别?
我的图表是渐进式的,我想清除不在 View 中的图表并使图表更快。最好的方法是什么?我可以使用 Dispose 方法吗?
另外,我们可以向左拖动图表 click + mouse drag. .我看到发布了类似 Axis 鼠标和触摸事件的 API 之类的东西。你能告诉我用它可以实现什么吗?
(现在它的右键单击+拖动)。

最佳答案

it's not working for Area range series.

setDataCleaningThreshold是新的 API,将慢慢引入现有系列。 v3.0 仅针对 LineSeries 引入及其衍生物(如 PointLineSeries )。
为防止混淆,请引用官方 API 文档以查看是否支持某些方法 - 例如,如果我们查看 AreaSeries ,它不是 API 的一部分。

Also there is setMaxPointCount in Area range Series , what is thedifference between both ?

setMaxPointCountsetDataCleaningThreshold为相同的目的而存在,并有效地实现相同的事情,但它们基于略有不同的想法。 setMaxPointCount通过指定要保留在数据“头部”的数据点数量来配置自动数据清理。 setDataCleaningThreshold通过指定渐进轴上的坐标来配置自动数据清理。可以在方便时清除该坐标“后面”的所有数据点。这种配置比“最大点数”略受欢迎,因为它对渲染引擎更方便,而且它的行为也更合乎逻辑 - 如果您通过单击鼠标左键拖动到图表 XY 的左上角来应用 fit() 操作,轴将在数据清洗阈值处停止,而不是显示所有数据,包括清洗阈值后面的数据。
这两种方法暂时都将得到支持,使用两者之间应该没有太大的区别,所以我建议使用你觉得更舒服的那个。
最终,数据清理配置将固定为更简单的 API,但现在我们仍然在感受不同的用户如何使用该库,以及我们如何最好地优化性能 - 所以 API 有点困惑(例如,有2 种方法用于相同目的)。

My charts are progressive and I want to clear the charts that are outof view and make the charts faster.What is the best way ?


对于 AreaSeries setMaxPointCount是唯一的自动选项。
请查看 updated documentation on the method了解更多。
您还可以使用 dispose 实现手动数据清理。方法,正如你所建议的。
但是,请先查看自动数据清理是否适合您。

关于lightningchart - 区域范围系列的 setDataCleaningThreshold,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67407076/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com