ノード上にハイチャートのデータをロードしていますが、単一ページのアプリケーションに反応してしまい、ページの中央に配置する方法がわかりません。現在、それは次のようになります。それが左に浮いていますし、私は途中でオレンジ色のボックス内のすべてのものを中心にしたいハイチャートの円グラフと凡例をページに表示するにはどうすればいいですか?
。私はhighcharts apiのドキュメント全体を見てきたし、それを理解するように見えることはできません。 jsfiddleはここにある:http://jsfiddle.net/tobitobetoby/1fqvzpdn/36/div
タグに
chart = new Highcharts.Chart({
chart: {
renderTo: 'container',
type: 'pie',
events: {
load: function(event) {
var chart = this,
points = chart.series[0].points,
len = points.length,
total = 0,
i = 0;
for (i = 0; i < len; i++) {
total += points[i].y;
}
chart.setTitle({
text: '<br>€' + total,
verticalAlign: 'middle',
style: {
fontFamily: 'Arial,Roboto,Helvetica,sans-serif',
fontWeight: 'bold',
fontSize: 34
},
});
// Adding 'transaction' label - labels below don't support images/icons
this.renderer.label("<div class='transactions' style='fontSize:20px !important;'><img style='width:25px; height:25px; position:relative; top:7px;' src='https://github.com/tobi-ajala/shell-exercise/blob/master/icons/card.png?raw=true'/>   Transactions</div>", 120, 130, null, null, null, true).add();
// Adding date label
this.renderer.label("<div class='transactions'>11 Sept 2017 - 11 Oct 2017</div>", 95, 225, null, null, null, true).add();
}
}
}
エクスポート時に無関係ですが、 ' 'がレンダリングされます。スペースのために、アイコン自体に右パディングを追加することができます。 –
少なくとも、最後にセミコロンがあるはずです。 '&nbsp'→' ' –