plotly / plotly/plotly.js

add level-of-detail for scatter plots (and geo/sf plots)

未关闭
#7,027 0 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

feature P2
主要语言
JavaScript
星标
18.3k
派生
2k
平均合并
2 天 12 小时
30 天内合并 PR
28

描述

Re-opening issue #4190 (copied below) as it is still something that is often an issue in our projects. Further expanding to include sf/geo plots as it would also be useful there as well.


I've been working on some data that has a LOT of lat/long scatter points in a dense area which causes a lot of lag. about 1500-2000 points per viewport seems to work quite fluidly, but above that the click and drag/zoom tools really start to lag (click and drag is by far the worst).

There is already a "max displayed" markers parameter (which I'm putting to use), however it causes "holes" to appear until the user has zoomed in significantly and due to the way the points are organised (equal steps in lat/long) there are weird striations and patterns that occur.

It would look a lot better if I were able to have a Level-of-detail (LOD) parameter. I have a number of thoughts on how this could be achieved.

  • The simplest of which would be a parameter that takes an array of sizes at zoom levels and combined with "max displayed" could be used to grow/shrink the markers at different zooms.
  • Simplest for the user might be a parameter which when active clusters the points (much like the google marker clustering).
  • More complex could be that the user supplies an array of their own data points to display at various zoom levels and the marker size for each step.
  • Finally, the user could add a trace for each of the different zoom levels and specify at which level the trace should be visible.

Obviously some of these could be done 3rd party by tapping onto the events, however it would be more suitable to add to the core library I think.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

该 issue 未指定文件、测试或具体的入口点。首先检查 "max displayed" 标记的行为和缩放交互处理,然后确定对于 scatter 和 geo/sf 图表,项目应支持所提议的哪些 LOD 方法。完成这项工作需要达成一致的设计、明确实现范围,并对密集点视图进行性能验证。

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript
领域
data-visualization
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。