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 @   话·醉月  阅读(42)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 【.NET】调用本地 Deepseek 模型
· CSnakes vs Python.NET:高效嵌入与灵活互通的跨语言方案对比
· DeepSeek “源神”启动!「GitHub 热点速览」
· 我与微信审核的“相爱相杀”看个人小程序副业
· Plotly.NET 一个为 .NET 打造的强大开源交互式图表库
点击右上角即可分享
微信分享提示