highcharts 数据千分位显示和饼图的简单用法

文章目录

  • 一、数据千分位显示
  • 二、饼图


一、数据千分位显示

这个是正常情况下的(默认是1,433,中间的【,】用空格标识的)
highcharts 数据千分位显示和饼图的简单用法_第1张图片

这是去掉空格之后的之后的
highcharts 数据千分位显示和饼图的简单用法_第2张图片

// 写在 HighCharts.chart()的外面,所有的图表都会被统一设置
 HighCharts.setOptions({
     
          lang: {
     
            thousandsSep: ''  // 这里也可以写',',页面会显示为1,433
          }
        });
      

二、饼图

highcharts 数据千分位显示和饼图的简单用法_第3张图片

plotOptions: {
     
            pie: {
     
              allowPointSelect: true,
              cursor: 'pointer',
              dataLabels: {
     
                enabled: true,
                distance: -40,   //这里注释掉,数字就会在外面,并且有牵引线
                color: '#000',
                format: '{point.y}个,
{point.percentage:.1f}%'
, style: { "fontSize": "13px", "fontWeight": "none", "textOutline": "none" } }, showInLegend: true } },

你可能感兴趣的:(js,vue.js)