我只想将列居中放置在他们的 xAxis 上,有没有办法做到这一点?这是我的高图代码
看起来该列总是从刻度开始,我只想显示 2 个刻度之间的列。
Highcharts.chart('YearNS', {
chart: {
width: 1200,
height: 450,
type: 'column',
events: {
click: function (e) {
console.log(e.type, this.name);
},
}
},
exporting: {
enabled: false
},
title: {
text: 'This Year NS vs Last 4 Years'
},
subtitle: {
text: 'Click the columns to view the breakdown by Term. Click again to view by Program. Updated as of ' + MyUpdateDate
},
credits: {
enabled: false
},
xAxis: {
min: 0,
max: 4,
categories: categories
},
yAxis: {
title: {
text: "Number of Students"
}
},
legend: {
enabled: true,
align: 'center',
layout: 'horizontal',
verticalAlign: 'top',
floating: false,
borderWidth: 1,
backgroundColor: ((Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF'),
shadow: true
},
plotOptions: {
series: {
point: {
events: {
click: function () {
ParamYear = this.category
var res = ParamYear.substring(0, 4);
// let urlParams = new URLSearchParams('=');
window.location = "http://localhost:37590/NewStudentReportTerm?ParYear=" + res
}
}
},
我希望 th 列出现在这些线之间,每年的中心。这可能吗?
森林海
相关分类