Highstock 导航器不可调节
Highstock navigator not adjustable
我有一个 Highstock 图表,其中包含几个系列以及几个月内每个系列的几个数据点。我希望能够在导航器 window 中调整选择,但我不能。
var seriesOptions = [
{
name: 'Apples',
data: [
{x: 1525737600000, y: Math.floor(Math.random() * 30)},
{x: 1535737600000, y: Math.floor(Math.random() * 30)},
{x: 1545737600000, y: Math.floor(Math.random() * 30)}
]
},
{
name: 'Oranges',
data: [
{x: 1525737600000, y: Math.floor(Math.random() * 30)},
{x: 1535737600000, y: Math.floor(Math.random() * 30)},
{x: 1545737600000, y: Math.floor(Math.random() * 30)}
]
},
{
name: 'Grapes',
data: [
{x: 1525737600000, y: Math.floor(Math.random() * 30)},
{x: 1535737600000, y: Math.floor(Math.random() * 30)},
{x: 1545737600000, y: Math.floor(Math.random() * 30)}
]
}
];
function createChart() {
Highcharts.stockChart('container', {
plotOptions: {
series: {
showInNavigator: true
}
},
tooltip: {
pointFormat: '<span style="color:{series.color}">{series.name}</span>: <b>{point.y}</b><br/>',
valueDecimals: 0
},
series: seriesOptions
});
}
createChart();
这是fiddle。
这是因为您没有足够的数据:
{
name: 'Oranges',
data: [
{x: 1525737600000, y: Math.floor(Math.random() * 30)},
{x: 1528737600000, y: Math.floor(Math.random() * 30)},
{x: 1530737600000, y: Math.floor(Math.random() * 30)},
{x: 1533737600000, y: Math.floor(Math.random() * 30)},
{x: 1535737600000, y: Math.floor(Math.random() * 30)},
{x: 1538737600000, y: Math.floor(Math.random() * 30)},
{x: 1540737600000, y: Math.floor(Math.random() * 30)},
{x: 1540737600000, y: Math.floor(Math.random() * 30)},
{x: 1545737600000, y: Math.floor(Math.random() * 30)}
]
}
我有一个 Highstock 图表,其中包含几个系列以及几个月内每个系列的几个数据点。我希望能够在导航器 window 中调整选择,但我不能。
var seriesOptions = [
{
name: 'Apples',
data: [
{x: 1525737600000, y: Math.floor(Math.random() * 30)},
{x: 1535737600000, y: Math.floor(Math.random() * 30)},
{x: 1545737600000, y: Math.floor(Math.random() * 30)}
]
},
{
name: 'Oranges',
data: [
{x: 1525737600000, y: Math.floor(Math.random() * 30)},
{x: 1535737600000, y: Math.floor(Math.random() * 30)},
{x: 1545737600000, y: Math.floor(Math.random() * 30)}
]
},
{
name: 'Grapes',
data: [
{x: 1525737600000, y: Math.floor(Math.random() * 30)},
{x: 1535737600000, y: Math.floor(Math.random() * 30)},
{x: 1545737600000, y: Math.floor(Math.random() * 30)}
]
}
];
function createChart() {
Highcharts.stockChart('container', {
plotOptions: {
series: {
showInNavigator: true
}
},
tooltip: {
pointFormat: '<span style="color:{series.color}">{series.name}</span>: <b>{point.y}</b><br/>',
valueDecimals: 0
},
series: seriesOptions
});
}
createChart();
这是fiddle。
这是因为您没有足够的数据:
{
name: 'Oranges',
data: [
{x: 1525737600000, y: Math.floor(Math.random() * 30)},
{x: 1528737600000, y: Math.floor(Math.random() * 30)},
{x: 1530737600000, y: Math.floor(Math.random() * 30)},
{x: 1533737600000, y: Math.floor(Math.random() * 30)},
{x: 1535737600000, y: Math.floor(Math.random() * 30)},
{x: 1538737600000, y: Math.floor(Math.random() * 30)},
{x: 1540737600000, y: Math.floor(Math.random() * 30)},
{x: 1540737600000, y: Math.floor(Math.random() * 30)},
{x: 1545737600000, y: Math.floor(Math.random() * 30)}
]
}