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'],
相關文章
相關標籤/搜索