3
我只想讓我的傳奇有名稱價值左對齊和百分比值右對齊,我已經連續兩天工作在這個東西,並在論壇上打開幾個不同的問題關於它和已經得到0答案,所以任何知識的人我會愛你的幫助!非常感謝你 http://jsfiddle.net/hAnCr/2/HighCharts餅圖圖例價值對齊
$("document").ready(
function(){
$('#container').highcharts({
chart:{
type:'pie',
height: 300,
width: 400
},
credits:{enabled: false},
colors:[
'#5485BC', '#AA8C30', '#5C9384', '#981A37', '#FCB319', '#86A033', '#614931', '#00526F', '#594266', '#cb6828', '#aaaaab', '#a89375'
],
title:{text: null},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
showInLegend: true,
dataLabels: {
enabled: false,
formatter: function() {
return this.percentage.toFixed(2) + '%';
}
}
}
},
legend: {
enabled: true,
layout: 'vertical',
align: 'right',
width: 200,
verticalAlign: 'middle',
useHTML: true,
labelFormatter: function() {
return '<div style="text-align: left; width:130px;">' + this.name + '</div><div style="width:40px; text-align:right;">' + this.y + '%</div>';
}
},
series: [{
type: 'pie',
dataLabels: {
},
data: [
['Domestic Equity', 38.5],
['International Equity', 26.85],
['Other', 15.70],
['Cash and Equivalents', 10.48],
['Fixed Income', 8.48]
]
}]
});
});
謝謝!我沒有漂浮他們,這是我的一個業餘錯誤,這無疑幫助我的一天,我會告訴你! – 2013-04-26 12:22:38
我希望做的最後一件事是隻在右側的圖例末尾加上Y值。如果你們中的任何一個人都可以幫助我解決這個問題,我將非常感激,但我明白如果你不知道這個方法!再次感謝 – 2013-04-26 13:18:08
這不再起作用,至少在最新版本的Firefox中。 – Jeff 2014-03-25 17:40:06