2013-04-30 63 views
0

如果我嘗試旋轉我的柱狀圖中的數據標籤,我無法對齊列的底部的標籤,verticalAlign似乎完成忽略。verticalAlign忽略非0旋轉

基本上欲以:

plotOptions: { 
    column: { 
     stacking: 'normal', 
     dataLabels: { 
     enabled: true, 
     verticalAlign: 'bottom',  
     rotation: -90 
     } 
    } 
} 

撥弄它在:http://jsfiddle.net/FbhAs/

任何人都知道一個變通?

- =戳刺

回答

0

可以更新datalabels位置的基礎上,翻譯()函數,其允許 「移動」 SVG對象定義postiison。

http://jsfiddle.net/wMLg6/37/

var bottom = chart.plotHeight - 20; 

     $.each(chart.series[0].data,function(i,data){ 

      data.dataLabel.attr({ 
       y: bottom 
      }); 
     }); 
1

的dataLabels似乎並沒有正確對齊的底部。相反,使用軸標籤本身。對於柱形圖,您可以將其放在xAxis中作爲圖表選項。

xAxis: {  
    labels: { 
     enabled: true, 
     rotation: -90, 
     y: -10 // negative goes upwards 
    } 
} 

然後,您可以根據dataLabels添加樣式,格式化函數等。