ボタンを使用して、グラフの種類を円グラフと縦列に切り替えます。 Pieがデフォルトです。列に切り替えると、カテゴリは表示されません。ここでImage: Pie is the default円から列に切り替えてラベルを表示
はフィドルです:http://jsfiddle.net/Gebifa/vLrx47a6/1/
は私がaleady x軸のカテゴリを設定しようとしましたが、唯一のHighchartsエラー18を得た - 要求された軸が存在していません。誰かがラベルを表示する方法を知っていますか?前もって感謝します。
exporting: {
buttons: {
contextButton: {
symbol: 'url(../../img/chartexport.png)'
},
barButton: {
x: -30,
_titleKey: 'barChart',
onclick: function() {
$.each(this.series,function(i,serie){
serie.update({
type:'column',
tooltip: {
positioner: function() {
return { x: 0, y: 0 };
},
pointFormat: '<span style="color:{series.color}">{series.name}</span>: <b>{point.y}</b><br/>',
shared: true
}
});
});
},
symbol: 'url(../../img/chartButtonBar.png)'
},
pieButton: {
x: -60,
_titleKey: 'pieChart',
onclick: function() {
$.each(this.series,function(i,serie){
serie.update({
type:'pie',
tooltip: {
positioner: function() {
return { x: 0, y: 0 };
},
pointFormat: '<span style="color:{series.color}">{series.name}</span>: <b>{point.percentage:.2f}%</b><br/>',
shared: true
}
});
});
},
symbol: 'url(../../img/chartButtonPie.png)'
}
},
あなたはフィドルを提供しますか? –
dataLabels:{enabled:true}を列の系列に追加してみてください –