apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.54k stars 19.61k forks source link

能不能定位某个节点到中心位置? #20098

Open qingyun1029 opened 4 months ago

qingyun1029 commented 4 months ago

What problem does this feature solve?

Due to the large amount of data in the diagram, the system is able to locate a node through search and locate it in the middle of the diagram.

Thanks !

What does the proposed API look like?

echarts v4.3,系统通过节点id就能够把当前节点定位到中心位置。

echarts-bot[bot] commented 4 months ago

@qingyun1029 It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗

TRANSLATED
**TITLE** Is it possible to locate a node to the center?
plainheart commented 4 months ago

如果是 treemap 可以用如下 action 实现:

myChart.dispatchAction({
    type: 'treemapZoomToNode',
    seriesId: 系列 ID,
    targetNodeId: 节点ID
})

参见 #18961。

icocoding commented 2 months ago

action.treemap. treemapZoomToNode
定位之后,如果设置了 series 的 scaleLimit min,就无法缩小了

如果是treemap可以用如下action实现:

myChart.dispatchAction({
    type: 'treemapZoomToNode',
    seriesId: 系列 ID,
    targetNodeId: 节点ID
})

参见#18961。