Incubator-echarts: 需求&求助:饼图 hover 在扇区上的放大动画效果能否支持调整

Created on 17 Aug 2016  ·  6Comments  ·  Source: apache/incubator-echarts

问题简述 (One-line summary)

希望能调整饼图 hover 在扇区上的放大动画效果,比如动画效果变弱,比如扇区大小变化没那么快,以及扇区扩大倍数调小等等

版本及环境 (Version & Environment)

  • ECharts 版本 (ECharts version): 3.0
  • 浏览器类型和版本 (Browser version): Chrome Latest Version
  • 操作系统类型和版本 (OS Version): Mac, Windows

    重现步骤 (Steps to reproduce)

不是bug, 新需求,极大可能性是我不会用 :joy:

期望结果 (Expected behaviour)

能支持 hover 在扇区的动画效果变弱

ECharts配置项 (ECharts option)

option = {
                tooltip: {
                    show: false,
                    trigger: 'item',
                    formatter: "{a} <br/>{b}: {c} ({d}%)"
                },
                legend: {
                    show: false
                },
                color:['#4a90e2', '#fda737'],
                series: [
                    {
                        type: 'pie',
                        radius: ['60%', '80%'],
                        avoidLabelOverlap: false,
                        label: {
                            normal: {
                                show: false,
                                position: 'center'
                            },
                            emphasis: {
                                show: true,
                                textStyle: {
                                    fontSize: '13',
                                    fontWeight: 'normal'
                                },
                                formatter : function (params) {                         
                                    return params.name + ' (' + params.percent + '%)';
                                }
                            }
                        },
                        labelLine: {
                            normal: {
                                show: false
                            }
                        },
                        data:[
                            {value: 30, name: '完成率'},
                            {value: 70, name: '未完成'}
                        ]
                    }
                ]
            };

其他信息 (Other comments)

image

enhancement

Most helpful comment

从下个版本起,可以通过 series.hoverOffset 配置高亮状态下的偏移量,默认值是 10。

All 6 comments

顶,同求,我看了下配置项,里面只找到选中扇区selected时的偏移量设置,没找到鼠标移入扇区hover时的偏移量设置。顺便附一句,扇形放大后有时会把边上的文字遮挡掉,这个有办法解决吗?

+1

顶,希望能设置调整。谢了!

+1

从下个版本起,可以通过 series.hoverOffset 配置高亮状态下的偏移量,默认值是 10。

Was this page helpful?
0 / 5 - 0 ratings

Related issues

akvaliya picture akvaliya  ·  3Comments

antorman picture antorman  ·  3Comments

jxffly picture jxffly  ·  3Comments

kirazxyun picture kirazxyun  ·  3Comments

Zendic picture Zendic  ·  3Comments