You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2021/10/27 09:12:53 UTC

[GitHub] [echarts] Drowned-fish commented on issue #12261: 在graph关系图中,文字无法缩放。鼠标移入节点的鼠标样式无法更改。

Drowned-fish commented on issue #12261:
URL: https://github.com/apache/echarts/issues/12261#issuecomment-952707728


   > > 已通过graphRoam实现:
   > > ```
   > >  // 鼠标滚轮监听放大缩小
   > >  myECharts.on('graphRoam', function(e) {
   > >     const option = that.echartsGraph.getOption(); // 获得当前option.series的zoom
   > >     const textPercent = (option.series[0].zoom - 0.8) / 0.8; // 计算比例,我设置zoom的初始值是0.8
   > >     option.series[0].label.fontSize = 9 + 9 * textPercent // 等比例计算fontSize
   > >     that.echartsGraph.setOption(option); // setOption
   > >   });
   > > ```
   > > 
   > > 
   > >     
   > >       
   > >     
   > > 
   > >       
   > >     
   > > 
   > >     
   > >   
   > > 同理可以加在toolbox内的自定义的“放大”和“缩小”按钮上
   > > 希望可以帮助到其他同学 😝
   > 
   > 通过这个方法监听在点击事件后仍是没有变化,能否请教一下
   
   这跟点击事件没有关系吧


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org