简体   繁体   中英

Highcharts 3D Pie

I drew a pie chart with highcharts , but in 3D mode my labels are separated from the chart. You can see this jsfiddle . If you change x and y values from dataLabels and run the example, you get the same result. The labels aren´t moved. Why? Do I need to define any parameter? With normal mode It works, but with 3D mode....BREAK!!

$(function () {
    $('#container').highcharts({
        chart: {
            type: 'pie',
            options3d: {
                enabled: true,
                alpha: 45,
                beta: 0
            }
        },
        title : {
            text : 'Test'
        },
        tooltip : {
            pointFormat: 'Value: <b>{point.percentage:.1f}%</b>'    
        },
        credits: {
            enabled: false
        },
        plotOptions: {
            pie: {
                allowPointSelect: true,
                depth: 35,
                cursor: 'pointer',
                dataLabels: {
                    enabled: true,
                    align: 'left',
                    format: '{point.name}',
                    connectorWidth: 5,
                    x:100,
                    y:300
                }
            }
        },
        series: [{
            name: 'Test - Levels',
            data: [
                ['Some Text Level 1', 74.25], 
                ['Some Text Level 2', 17.82], 
                ['Some Text Level 3', 7.92]
            ]
        }]
    });
});

UPDATED:

Bug found in HighCharts v4.0.1

BUG FIXED in HIGHCHARTS v4.0.3

Unforuantely it is known bug, reported to our developers here: https://github.com/highslide-software/highcharts.com/issues/3082

Please stay on track with the github thread, until publish a fix.

You cannot fix the label position.

Try it:

pie: {
                allowPointSelect: true,
                depth: 35,
                cursor: 'pointer',
                dataLabels: {
                    enabled: true,
                    format: '{point.name}',
                    connectorWidth: 5
                }
            }

http://jsfiddle.net/8cK3M/8/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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