【发布时间】:2021-08-04 23:46:48
【问题描述】:
我的股票图表有以下配置:
const stockChartOptions = {
chart: {
type: 'column',
zoomType: 'x',
},
series: [
{
type: 'column',
name: 'error',
stack: 'es',
data: [],
color: 'red',
},
{
type: 'column',
name: 'success',
stack: 'es',
data: [],
color: 'blue',
},
{
type: 'column',
name: 'warning',
stack: 'w',
data: [],
color: 'yellow',
},
],
navigator: {
adaptToUpdatedData: false,
series: [
{
data: [],
color: 'blue'
},
],
},
scrollbar: {
liveRedraw: false
},
title: {
text: ''
},
subtitle: {
text: ''
},
plotOptions: {
column: {
stacking: 'normal'
},
},
rangeSelector: {
buttons: [
{
type: 'week',
count: 1,
text: '1 week',
}, {
type: 'month',
count: 1,
text: '1 month',
},{
type: 'month',
count: 3,
text: '3 month',
},
],
inputEnabled: false,
selected: 4,
},
xAxis: {
minRange: 24 * 3600 * 1000
},
yAxis: {
floor: 0
},
};
重要的是导航器。 在这种情况下,加载时默认缩放为一周,范围为最近的日期。 当我用这个替换 navigator 字段时:
navigator: {
enabled: false
}
缩放是一周,但它显示的是从一开始的日期。 不像以前那样是最近的日期。 我应该怎么做才能删除导航器并保持默认缩放(1 周)以显示最近的日期?
提前谢谢你。
【问题讨论】:
标签: highcharts