我只想将列居中放置在他们的 xAxis 上,有没有办法做到这一点?这是我的高图代码看起来该列总是从刻度开始,我只想显示 2 个刻度之间的列。检查这个https://imgur.com/lvV006MHighcharts.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 列出现在这些线之间,每年的中心。这可能吗?
1 回答

森林海
TA贡献2011条经验 获得超2个赞
您需要禁用grouping该系列的选项column:
plotOptions: {
column: {
grouping: false
}
}
现场演示:http: //jsfiddle.net/BlackLabel/ow8vkq1f/
API 参考:https ://api.highcharts.com/highcharts/plotOptions.column.grouping
- 1 回答
- 0 关注
- 94 浏览
添加回答
举报
0/150
提交
取消