1
我使用highcharts向我顯示來自數據庫的調用數量,並且還希望使用數據庫中的引號將百分比顯示爲數據標籤。 問題出在highcharts y顯示調用次數,x顯示xAxis中存儲的名稱,當我在plotOptions中調用quote direkt時:格式如下格式:[{{quote |原始}}],它顯示來自每個數據庫中的數據庫的所有值。如何在高圖中設置數據庫格式化器
// Create the chart
$(function() {
var i = 0;
var caller = [
{ name: 'calls', data:[{{ calls }}] },
]
Highcharts.chart('container', {
chart: {
type: 'column'
},
title: {
text: 'EASy call {{ date|date("d.m.Y") }}'
},
subtitle: {
text: ''
},
xAxis: {
categories: [{{callPoint | raw}}],
},
plotOptions: {
series: {
borderWidth: 0,
dataLabels: {
enabled: true,
format: '{y} %'
}
}
},
tooltip: {
headerFormat: '<span style="font-size:11px">{series.name}</span><br>',
pointFormat: '<span style="color:{point.color}">calls</span>: <b>{point.y:.2f}</b> <br/>'
},
series: caller
});
});
是否有可能做一些像我在highchart中需要的東西?或任何建議?
非常感謝,但這不完全是我所需要的。 –
@TonGok:你可以修改'formatter:function(){'根據你的願望 –
我知道如何得到x + y,但是,我需要從第一個x的其他數據中獲得額外x作爲數據棒 –