我想要实现的是拥有一个随着数据点增加而宽度继续增加的高图表
目前,我有以下
AM 使用带有 highcharts 的 vuejs,但应该类似于 jquery 或其他
<div class="col-md-6" style="overflow:auto"> //set overflow css
<div id="container_h"></div>
<div>
现在是渲染 highchart 的脚本代码
this.chart = Highcharts.chart('container_h', {
chart: {
type: 'column'
},
credits: {
enabled: false
},
title: {
text: ''
},
xAxis: {
categories: this.ranges
},
yAxis: {
min: 0,
title: {
text: 'Total trucks'
},
stackLabels: {
enabled: true,
style: {
fontWeight: 'bold',
color: (Highcharts.theme && Highcharts.theme.textColor) || 'gray'
}
}
},
tooltip: {
headerFormat: '<b>{point.x}</b><br/>',
pointFormat: '{series.name}: {point.y}<br/>Total: {point.stackTotal}'
},
plotOptions: {
column: {
stacking: 'normal',
dataLabels: {
enabled: true,
color: (Highcharts.theme && Highcharts.theme.dataLabelsColor) || 'white'
}
}
},
series: this.chartdata
});
上面呈现了一个图表
我期待实现的是:highchart 列具有固定宽度,当它增长时它会创建一个滚动,x-axis
所以像这样
有一个滚动区域
我如何实现这一目标?