2
A
答えて
2
チェックhighcharts legend APIに
から伝説
をカスタマイズすることができます。 (背景色はチャート自体から取られる)
legend: {
align: 'right',
verticalAlign: 'top',
layout: 'vertical',
x: -50,
y: 120,
symbolPadding: 0,
symbolWidth: 0.1,
symbolHeight: 0.1,
symbolRadius: 0,
useHTML: true,
symbolWidth: 0,
labelFormatter: function() {
if(this.name=="Microsoft Internet Explorer"){
return '<div style="width:200px;"><span style="float:left; margin-left:10px"><img src = "http://cdn.onlinewebfonts.com/svg/img_508736.svg" width = "40px" height = "40px" style="background-color:' + this.color + ';"></span><span style="float:right;padding:9px">' + this.percentage.toFixed(2) + " " + this.y + '%</span></div>';
}
if(this.name=="Chrome"){
return '<div style="width:200px;"><span style="float:left; margin-left:10px"><img src = "http://cdn.onlinewebfonts.com/svg/img_159842.svg" width = "40px" height = "40px" style="background-color:' + this.color + ';"></span><span style="float:right;padding:9px">' + this.percentage.toFixed(2) + " " + this.y + '%</span></div>';
}
if(this.name=="Firefox"){
return '<div style="width:200px;"><span style="float:left; margin-left:10px"><img src = "http://cdn.onlinewebfonts.com/svg/img_261106.svg" width = "40px" height = "40px" style="background-color:' + this.color + ';"></span><span style="float:right;padding:9px">' + this.percentage.toFixed(2) + " " + this.y + '%</span></div>';
}
},
itemStyle: {
color: '#ffffff',
fontWeight: 'bold',
fontSize: '19px'
}
},
Fiddleデモ適切なSVG画像を使用し
0
あなたは伝説を変更することができます。
.highcharts-legend-item rect {
visibility: hidden;
}
とlabelFormatter
を使用:伝説のシンボルの代わりにカスタムアイコンを表示するには、あなたは、真の値とのlegend.useHTMLを設定して、シンボルを非表示にする必要があります。下記の例を見てください。
APIリファレンス:
http://api.highcharts.com/highcharts/legend
例:3015ディープ
http://jsfiddle.net/2trc1gv9/
関連する問題
- 1. 追加カスタム伝説
- 2. Rのカスタム関数の伝説R
- 3. 伝説
- 4. 伝説のテキストスペース
- 5. ggplotは伝説
- 6. matplotlibの伝説
- 7. 伝説は色
- 8. リバース伝説
- 9. 伝説が
- 10. QWebEngineView:ボケ伝説
- 11. Highmap R(または)ジャバスクリプト - 追加カスタム伝説ここに
- 12. ハイチャート - 伝説のツールチップ
- 13. Matlab2016a Simulinkの伝説
- 14. 変更sliderInput伝説
- 15. Highchartsは、カスタムシンボル伝説
- 16. charts.jsは伝説と
- 17. AngularJSチャート - ショー伝説
- 18. ggplot2:単一伝説
- 19. r伝説のトラブル、伝説のテキストサイズを変更する方法
- 20. python:反復伝説のプロット
- 21. jqPlot:ドーナツチャート中央の伝説
- 22. 意味の伝説_ [...] _アイデンティティ
- 23. SAS sgplot伝説&軸ラベル
- 24. RgoogleMapsの伝説ですか?
- 25. Seaborn countplotセット伝説は
- 26. ラップ水平伝説が
- 27. 並べ替え伝説
- 28. Googleのチャート:円グラフスライス伝説
- 29. の操作R plotly伝説
- 30. Plotlyの伝説、Pythonの
おかげで、それが仕事だ:) –
あなたは歓迎されています –