echarts [Bug] the view move strangely after set the scaleLimit

rjjhvcjd  于 4个月前  发布在  Echarts
关注(0)|答案(2)|浏览(199)

Version

echarts@5.3.2

https://codepen.io/Nauxscript/pen/VwQpwNG

Steps to Reproduce

use the public example in https://echarts.apache.org : https://echarts.apache.org/examples/zh/editor.html?c=graph&reset=1&edit=1
and add scaleLimit like:

...
series: [
      {
        name: 'Les Miserables',
        type: 'graph',
        layout: 'none',
        data: graph.nodes,
        links: graph.links,
        categories: graph.categories,
        roam: true,
        label: {
          position: 'right',
          formatter: '{b}'
        },
        scaleLimit: {
          min: 2,
          max: 12
        },
        lineStyle: {
          color: 'source',
          curveness: 0.3
        },
        emphasis: {
          focus: 'adjacency',
          lineStyle: {
            width: 10
          }
        }
      }
    ]
...

Current Behavior

the view will move, its ok, but the location of the move is incorrect and strangely
like:

the last move in this gif is cause by scrolling the wheel crazily

Expected Behavior

the center of echart view is correct and its would not move strangely

Environment

No response

Any additional comments?

No response

dfddblmv

dfddblmv1#

I had a similar problem, where if I scaled out (or in, it doesn't really matter) completely and then try to zoom out some more, the zoom would stay at the scaleLimit, but the center would still change.

I opened a StackOverflow question and have found a workaround, but I still think it's a bug that shouldn't happen.

gr8qqesn

gr8qqesn2#

I had a similar problem, where if I scaled out (or in, it doesn't really matter) completely and then try to zoom out some more, the zoom would stay at the scaleLimit, but the center would still change.

I opened a StackOverflow question and have found a workaround, but I still think it's a bug that shouldn't happen.

As you can see, it has been around a year and a half since this occurred, and I’m not sure if anyone will fix it ...

相关问题