我只想將列居中放置在他們的 xAxis 上,有沒(méi)有辦法做到這一點(diǎn)?這是我的高圖代碼看起來(lái)該列總是從刻度開(kāi)始,我只想顯示 2 個(gè)刻度之間的列。檢查這個(gè)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 列出現(xiàn)在這些線之間,每年的中心。這可能嗎?
1 回答

森林海
TA貢獻(xiàn)2011條經(jīng)驗(yàn) 獲得超2個(gè)贊
您需要禁用grouping該系列的選項(xiàng)column:
plotOptions: {
column: {
grouping: false
}
}
現(xiàn)場(chǎng)演示:http: //jsfiddle.net/BlackLabel/ow8vkq1f/
API 參考:https ://api.highcharts.com/highcharts/plotOptions.column.grouping
- 1 回答
- 0 關(guān)注
- 91 瀏覽
添加回答
舉報(bào)
0/150
提交
取消