highcharts经常使用设置

Highcharts基础教程:图例(Legend)

 //https://www.evget(删除).com/article/2016/7/15/24503.htmlhtml

1.highcharts设置legend为正方形字体

 

 legend: {
                itemDistance: 20,//距离
                symbolWidth:12,  //设置为正方形
                symbolHeight:12,
                symbolRadius:0,
          itemStyle:{   //设置字体颜色和加粗
          color:"red",
          fontWeight:"normal"
      }
 }, tooltip: { pointFormat: '{series.name}: <b>{point.y}</b>人' }, plotOptions: { pie: { allowPointSelect: true, cursor: 'pointer', dataLabels: { enabled: true, style: { color:'#4e4e4e', fontWeight:'normal', fontSize:'22px' }, format: '<span>{point.name}</span>: <b style="color:#d40000;font-size:26px;">{point.y}</b> 人', },  showInLegend:true } }, colors: ['#4f9dd3', '#fc9f60'],
相关文章
相关标签/搜索