question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Graph dispatch zoom in action

See original GitHub issue

One-line summary [问题简述]

I am unable to programmatically zoom into rendered graph. As the page is loaded, graph is loaded. I need to zoom in particular part of the graph. Don’t know how.

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]: 4.1.0
  • Browser version [浏览器类型和版本]: Chrome 69, but probably doesn’t matter
  • OS Version [操作系统类型和版本]: Mac OS Mojave but probably doesn’t matter

Expected behaviour [期望结果]

There should be available method for zoom in…

ECharts option [ECharts配置项]

option = {
            title: {
                text: ''
            },
            tooltip: {},
            toolbox: {},
            animationDurationUpdate: 1500,
            animationEasingUpdate: 'quinticInOut',
            series: [{
//                focusNodeAdjacency: true,
                type: 'graph',
                layout: 'none',
                symbolSize: 10,
                symbolKeepAspec: true,
                roam: true,
                dataZoom: {
                    type: 'absolute'
                },
                nodeScaleRatio: 0.6,
//                scaleLimit: {
//                    min: 0,
//                    max: 10,
//                },
                label: {
                    show: true,
                    position: 'bottom',
                    color: '#0066b2',
                    fontSize: 1,
                    distance: 0.1
                },
                edgeSymbol: ['circle', 'arrow'],
                edgeSymbolSize: [4, 10],
                edgeLabel: {
                    normal: {
                        textStyle: {
                            fontSize: 20
                        }
                    }
                },
                data: myChartData,
                links: myChartLinks
            }]
        }

Other comments [其他信息]

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Oviliacommented, Apr 23, 2020

@narenderv7 You can get the zoom and center from chart.getOption().series[0] and save it. Then, when you want to restore, set it with chart.setOption. It should work. The document seems to be out of date, I will update it soon.

0reactions
github-actions[bot]commented, Apr 30, 2022

This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Graph dispatch zoom in action #9208 - apache/echarts
I am unable to programmatically zoom into rendered graph. As the page is loaded, graph is loaded. I need to zoom in particular...
Read more >
How to Zoom in on a Graph - YouTube
Learn how to zoom in on specific plots of data and easily navigate throughout this data. This tool will help you to explore...
Read more >
Event and Action - Concepts - Handbook - Apache ECharts
The following example shows how to highlight each sector one by one in the pie chart using dispatchAction . option = { tooltip:...
Read more >
Zoom Functionality Not Implemented, need alternative
I was wondering if there is an alternative that would force zoom onto the Graph, and I was thinking there might be some...
Read more >
Supported User Interactions | yFiles for HTML Documentation
Exploring the graph is often performed by panning the viewport and zooming. These are the most common types of interactions and are present...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found