Highcharts 箱线图自定义标签最大四分位数中位数和最小值?
Highcharts boxplot custom labels for maximum quartiles median and minimum?
我想更改 highcharts 箱线图的最大值、上四分位数、中值、下四分位数和最小值的工具提示标签。我认为这是可能的,但找不到解决方案。这是我现在拥有的基本箱线图的快速 JSFiddle。
Highcharts.chart('container', {
chart: {
type: 'boxplot',
inverted: true,
},
title: {
text: 'Highcharts Box Plot Example'
},
legend: {
enabled: false
},
xAxis: {
lineWidth: 0,
tickWidth: 0,
labels: {
enabled: false
}
},
yAxis: {
gridLineWidth: 0,
labels: {
enabled: false,
}
},
series: [{
name: 'Observations',
data: [
[760, 801, 848, 895, 965]
],
dataLabels: {
enabled: true
}
}]
});
使用工具提示并读取 point
值,如本例所示:
示例:
// Set the tooltip:
tooltip: {
formatter: function () {
//// Use this for hover the cursor over the graph and view the
//// F12 developer tools - console - for get the results you need:
// console.log(this);
// read values as :
// this.y (it's the maximun value) = 965
// this.point.low (it's the minimun value) = 760
// this.point.median (it's the median value) = 848
return 'The maximun value is <b>' + this.y +
'</b> and the minimun value is <b>' + this.point.low + '</b>';
}
},
我想更改 highcharts 箱线图的最大值、上四分位数、中值、下四分位数和最小值的工具提示标签。我认为这是可能的,但找不到解决方案。这是我现在拥有的基本箱线图的快速 JSFiddle。
Highcharts.chart('container', {
chart: {
type: 'boxplot',
inverted: true,
},
title: {
text: 'Highcharts Box Plot Example'
},
legend: {
enabled: false
},
xAxis: {
lineWidth: 0,
tickWidth: 0,
labels: {
enabled: false
}
},
yAxis: {
gridLineWidth: 0,
labels: {
enabled: false,
}
},
series: [{
name: 'Observations',
data: [
[760, 801, 848, 895, 965]
],
dataLabels: {
enabled: true
}
}]
});
使用工具提示并读取 point
值,如本例所示:
示例:
// Set the tooltip:
tooltip: {
formatter: function () {
//// Use this for hover the cursor over the graph and view the
//// F12 developer tools - console - for get the results you need:
// console.log(this);
// read values as :
// this.y (it's the maximun value) = 965
// this.point.low (it's the minimun value) = 760
// this.point.median (it's the median value) = 848
return 'The maximun value is <b>' + this.y +
'</b> and the minimun value is <b>' + this.point.low + '</b>';
}
},