Highchart not fully rendered, only when mouse over

风流意气都作罢 提交于 2019-12-24 09:39:21

问题


im making a pie chart with a lot of data, however the chart its not fully rendered (only the half) the other half its rendered only when i pass the mouse over, and not always, here is my code!:

    // Create the chart
    $('#container').highcharts(
    {
        chart: 
        {
            type: 'pie',
            height: 1200,
            width:  1200
        },
        title: 
        {
            text: 'Films by category'
        },
        yAxis: 
        {
            title: 
            {
                text: 'Total percent market share'
            }
        },
        plotOptions: 
        {
            pie: 
            {
                shadow: false,
                center: ['50%', '50%']
            }
        },
        tooltip: 
        {
            valueSuffix: '%'
        },
        series: 
        [
            {
                name: 'Film cateories',
                data: browserData,
                size: '60%',
                dataLabels: 
                {
                    formatter: function() 
                    {
                        return this.y > 5 ? this.point.name : null;
                    },
                    color: 'white',
                    distance: -30
                }
            }, 
        {
            name: 'Films',
            data: versionsData,
            size: '80%',
            innerSize: '60%',
            dataLabels: 
            {
                formatter: function() 
                {
                    // display only if larger than 1
                    return this.y > 1 ? '<b>'+ this.point.name +':</b> '+ this.y +'%'  : null;
                }
            },
            cursor: 'pointer',
            point:
            {
                events:
                {
                    click: function()
                    {
                        alert("Value "+this.y+" category "+this.category+" id "+this.id);
                    }
                }
            }
        }]
    });
});

Thanks in advance!

JSFiddle

来源:https://stackoverflow.com/questions/17983210/highchart-not-fully-rendered-only-when-mouse-over

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!