简体   繁体   English

列范围上的Highcharts minPointLength无法正常工作

[英]Highcharts minPointLength on columnrange not working

I'm working with the columnrange chart type, and some of my could end up being much much smaller than the normal size, so I would like to specify the minPointLength so that the small data points are still visible amidst their larger neighbors and can easily be hovered over and clicked on. 我正在使用columnrange图表类型,我的一些最终可能会比正常大小小得多,因此我想指定minPointLength,以便较小的数据点在较大的邻居中仍然可见,并且可以轻松地悬停并单击。 I have tried placing the minPointLength option in multiple places throughout my code, but it doesn't seem to ever affect the size of the columns. 我曾尝试将minPointLength选项放置在我的代码的多个位置,但它似乎从未影响列的大小。 I have gotten minPointLength to work fine on other chart types, but not with the columnrange chart. 我已经得到minPointLength可以在其他图表类型上正常工作,但不能与columnrange图表一起工作。 Here is a little js fiddle I borrowed and modified to attempt to accomplish what I want: http://jsfiddle.net/kdCgU/7/ 这是我借用的小js小提琴,并进行了修改以尝试完成我想要的: http : //jsfiddle.net/kdCgU/7/

$(function() {

window.chart = new Highcharts.Chart({

    chart: {
        renderTo: 'container',
        type: 'columnrange',
        inverted: true
    },

    xAxis: {
        labels: {
            enabled: false
        }
    },

    plotOptions: {
        series: {
            minPointLength: 10, //This doesn't seem to do anything
            dataLabels: {
                enabled: true,

            },
        }
    },

    series: [{
        name: "Product A",
        data: [[-200, 200]]},
    {
        name: "Product B",
        data: [[-150, 150]]},
    {
        name: "Product C",
        data: [[-100, 100]]},
    {   name: "Small Data",
        data: [[0, 1]]}
                         ]
});

Any help would be greatly appreciated, thanks! 任何帮助将不胜感激,谢谢!

It is known bug reported here , but is fixed in master branch . 这是已知的bug报告在这里 ,而是固定在master branch

http://jsfiddle.net/sbochan/kdCgU/8/ http://jsfiddle.net/sbochan/kdCgU/8/

Like I said in my comment it is a bug. 就像我在评论中说的那样,这是一个错误。 It is already reported on their github here . 已经在他们的github上报道

It seems to be fixed on the master : 它似乎固定在master

http://jsfiddle.net/xAU6X/ http://jsfiddle.net/xAU6X/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM