首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Highcharts :漏斗图类型的选择问题

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

Stack Overflow用户
提问于 2013-04-16 20:04:55
回答 1查看 1.2K关注 0票数 1

我在尝试在漏斗图中进行选择(通过单击漏斗部分)时遇到了一个问题。选择过程中出现JS错误。

非常感谢

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

代码语言:javascript
复制
$(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
        );
    }
});
});
EN

回答 1

Stack Overflow用户

发布于 2013-04-16 21:56:43

它可能与已知的错误https://github.com/highslide-software/highcharts.com/issues/1607有关,因此您应该使用主版本

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

代码语言:javascript
复制
https://raw.github.com/highslide-software/highcharts.com/master/js/modules/funnel.src.js
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/16036589

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档