本文介绍了在高图中隐藏或禁用导航器句柄的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想禁止在highcharts中使用导航器,但仍将其显示为完整小图表。
可能吗?你可以在回调中隐藏它们:
但用户仍然可以通过使用手柄来改变极端情况(即使它们是不可见的)。要改变这种行为,您需要编辑源代码。
$('#container')。highcharts('StockChart',选项,函数(图表){
var handles = chart.scroller.handles;
setTimeout(function(){
handles [0] .hide();
handles [1 ] .hide();
},1);
});
I want to disable the use of navigator in highcharts but still show it as "full" small chart.
Is it possible?
解决方案
Yes, you can hide them in callback: http://jsfiddle.net/nX37D/
But user still will have possibility to change extremes by using handles (even if they are invisible). To change that behavior, you will need to edit sources.
$('#container').highcharts('StockChart', options, function (chart) {
var handles = chart.scroller.handles;
setTimeout(function () {
handles[0].hide();
handles[1].hide();
}, 1);
});
这篇关于在高图中隐藏或禁用导航器句柄的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!