【发布时间】:2016-07-28 12:15:23
【问题描述】:
我想自定义 HighChart 中的工具提示功能。 我有一个条形图,悬停时工具提示现在只显示一个值,但我想显示三个值。
下面是我的代码:
$(function () {
$('#container').highcharts({
chart: {
type: 'bar'
},
title: {
text: ''
},
subtitle: {
},
xAxis: {
categories: ['Question\'s'],
title: {
text: ''
}
},
yAxis: {
min: 0,
title: {
text: 'Average Scores',
},
labels: {
overflow: 'justify'
}
},
tooltip: {
valueSuffix: ''
},
plotOptions: {
bar: {
dataLabels: {
enabled: true
}
}
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'top',
x: 10,
y: -10,
floating: true,
borderWidth: 1,
backgroundColor: ((Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF'),
shadow: true
},
credits: {
enabled: false
},
series: [{
name: 'My Issue',
data: [5.4]
// want to add some value here to display
}, {
name: 'My Knowledge',
data: [8.2]
// want to add some value here to display
}, {
name: 'My Friendliness',
data: [7]
// want to add some value here to display
},
{
name: 'My time',
data: [6]
// want to add some value here to display
},
{
name: 'Z Score',
data: [9]
// want to add some value here to display
}
]
});
});
【问题讨论】:
标签: jquery html highcharts bar-chart