Customize and modify the color of the donut histogram

 

 Pass in the data array in option

itemStyle:{

color:"#ccc"

}

Colors and other properties can be customized for each data

        data: [
            { value: numA.value, name: '已完成',
            itemStyle: {
                color: "#18ad79"
              }
             },
            {
              value: numB.value, name: '未完成',
               itemStyle: {
                color: "#ccc"
              }
            }

 

Modify the ring size

 Set the radius attribute. The first is the size of the inner circle, and the second is the size of the outer circle.

radius: ['60%', '70%'],

Guess you like

Origin blog.csdn.net/weixin_70563937/article/details/130204658
Recommended