Highcharts:漏斗图表类型的选择问题

时间:2013-04-16 12:04:55

标签: highcharts

尝试在渠道图表中进行选择(通过点击渠道部分)时遇到问题。选择过程中发生JS错误。

非常感谢

http://jsfiddle.net/JvY4s/1246/

$(function () {


var chart = new Highcharts.Chart({
    chart: {
        renderTo: 'container',
        type: 'funnel',
        marginRight: 100
    },
    title: {
        text: 'Sales funnel'
    },
    plotArea: {
        shadow: null,
        borderWidth: null,
        backgroundColor: null
    },
    plotOptions: {
        series: {
            allowPointSelect:true,
            dataLabels: {
                enabled: true,
                format: '<b>{point.name}</b> ({point.y:,.0f})',
                color: 'black',
                softConnector: true
            },
            neckWidth: '30%',
            neckHeight: '25%'

            //-- Other available options
            // height: pixels or percent
            // width: pixels or percent
        }
    },
    legend: {
        enabled: false
    },
    series: [{
        name: 'Unique users',
        data: [
            ['Website visits',   15654],
            ['Downloads',       4064],
            ['Requested price list', 1987],
            ['Invoice sent',    976],
            ['Finalized',    846]
        ]
    }]
});

// Add the jQuery UI resizin
var container = $('#container')[0];
$('#resizer').resizable({
    // On resize, set the chart size to that of the 
    // resizer minus padding. If your chart has a lot of data or other
    // content, the redrawing might be slow. In that case, we recommend 
    // that you use the 'stop' event instead of 'resize'.
    resize: function() {
        chart.setSize(
            this.offsetWidth - 20, 
            this.offsetHeight - 20,
            false
        );
    }
});
});

1 个答案:

答案 0 :(得分:1)

可能它与已知错误https://github.com/highslide-software/highcharts.com/issues/1607有关所以你应该使用主版本

http://jsfiddle.net/JvY4s/1248/

https://raw.github.com/highslide-software/highcharts.com/master/js/modules/funnel.src.js