Highcharts使用——图表使用(二)

 

饼状图中心标题

  • 处于中心:floating
optionsData.title = {
    floating: true,
    text: allMinerNum
};

饼状图事件

  • events
plotOptions: {
    pie: {
        point: {
            events: {
                mouseOver: (e) => {
                    // 鼠标滑过时动态更新标题
                    this.optionsData.title.text = e.target.name + '\t' + e.target.y;
                }
            }
        }
    }
},

饼状图可点击浮动

  • allowPointSelect
plotOptions: {
    pie: {
        allowPointSelect: true
    }
},

 柱状图数据显示

  • 显示数值:dateLabels
series = [
        {
            dataLabels: {
                enabled: true,
                // color: '#FFFFFF',
            }
        }
    ];

柱状图颜色显示

  • 每个柱数据颜色和自己设置匹配显示:colorPoint
plotOptions: {
      series: {
           colorByPoint: true,
           showInLegend: false
      }
}

 

posted @ 2022-11-10 11:26  话·醉月  阅读(33)  评论(0编辑  收藏  举报