Skip to content

[Feature] Spatial Indexing for Tooltip? #16232

@tihuan

Description

@tihuan

What problem does this feature solve?

For scatter series, when we render 50K+ data points, hovering over a dot to show tooltip becomes noticeably slow (somehow turning on large paints the dots outside of the grid for me, so I can't use it).

I wonder if it's because we're searching the nearest datapoint linearly with O(N) instead of O(logN) with spatial indexing?

D3FC uses d3-quadtree to index all the data points and that makes their tooltip really fast!

https://blog.scottlogic.com/2020/05/01/rendering-one-million-points-with-d3.html#spatial-search-of-large-datasets

Would love to know what the team thinks 😄

Thank you!

What does the proposed API look like?

chartInstance.set({
  series: [{
    type: "scatter",
    spatialIndex: "quadtree", // default to quadtree
    // ... other scatter series option
  }],
  // ... other options
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    enThis issue is in Englishnew-featurestaleInactive for a long time. Will be closed in 7 days.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions