在 Highcharts 中,我可以通过按住 Ctrl 键并单击来选择多个点。我怎样才能使多重选择成为默认行为并且不需要按住 ctrl 按钮?
最佳答案
您可以包装 Highcharts.Point.prototype.select
方法并将 accumulate
参数永久设置为 true:
(function(H) {
H.wrap(H.Point.prototype, 'select', function(proceed, selected, accumulate) {
accumulate = true;
proceed.apply(this, Array.prototype.slice.call(arguments, 1));
});
}(Highcharts));
<小时/>
关于javascript - 如何在 Highcharts 中设置默认多选?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57655101/