echarts pie 圆环图中间显示数据


series : [
            {
              type : 'pie',
              hoverAnimation: false,
              center : ['16%', '20%'],
              radius : radius,
              label: { //  饼图图形上的文本标签
                normal: { // normal 是图形在默认状态下的样式
                  show: true,
                  position: 'center',
                  color: '#000',
                  fontSize: 16,
                  fontWeight: 'bold',
                  formatter: '{c}' // {b}:数据名; {c}:数据值; {d}:百分比,可以自定义显示内容,
                }
              },
              data : [
                {name:'GoogleMaps',
                  value: parseInt(data_1),
                  itemStyle : {
                    normal: {
                      color: '#2866FF',
                      label: {
                        normal: {show: true}
                      }
                    }
                  }
                },
                {name:'other',value:100 - parseInt(data_1), itemStyle : labelBottom, label: { normal: { show: false}}}
              ]
            },

 

效果展示: 

  

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM