Highstocks - 如何更改默认缩放 [英] Highstocks - How to change the default Zoom
问题描述
这个问题产生于搜索时间较长的小时,缩放,极端情况,范围以及单词的其他任何可能变化,这些都会导致高分辨率图表自定义函数的一些变化。
>有没有办法在 HighStocks (不是HighCharts)中将默认缩放比例改为1个月而不是3个月<写一个函数来计算它会发生什么? 您可以通过以下代码更改它: 你可以看看下面的例子:http://jsfiddle.net/QnvrR 。 默认按钮为:
new Highcharts.StockChart({
。
。
。
rangeSelector:{
selected :0
}
});
按钮:[{
type:'month',
count:1,
text:'1m'
} ,{
type:'month',
count:3,
text:'3m'
},{
类型:'month',
count:6,
text:'6m'
},{
type:'ytd',
text:'YTD'
},{
键入:'year',
count:1,
text:'1y'
},{
类型:'all',
text:'All'
因此,你必须根据你想要的改变选择的数量。
This question results from hours of googling highstocks, zoom, extremes, ranges, and every other possible variation of the words, all resulting in some variation of custom functions for high charts answers.
Is there a way to simply change the default zoom to 1 month instead of 3 months in HighStocks (not HighCharts) without writing a function to calculate what it happens to be?
You can change it by the following code:
new Highcharts.StockChart({
.
.
.
rangeSelector: {
selected: 0
}
});
You can take a look the following example: http://jsfiddle.net/QnvrR/.
The default buttons are:
buttons: [{
type: 'month',
count: 1,
text: '1m'
}, {
type: 'month',
count: 3,
text: '3m'
}, {
type: 'month',
count: 6,
text: '6m'
}, {
type: 'ytd',
text: 'YTD'
}, {
type: 'year',
count: 1,
text: '1y'
}, {
type: 'all',
text: 'All'
}]
So, you have to change the number of the selected according to what you want.
Reference
这篇关于Highstocks - 如何更改默认缩放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!