2

是否可以将饼图(highcharts.com)重新绘制为椭圆形,如图所示在此处输入图像描述

还有右边的阴影之类的东西。

我试过这段代码

// Radialize the colors
            Highcharts.getOptions().colors = Highcharts.map(Highcharts.getOptions().colors, function(color) {
                return {
                    radialGradient: { cx: 0.5, cy: 0.3, r: 0.7 },
                    stops: [
                        [0, color],
                        [1, Highcharts.Color(color).brighten(-0.3).get('rgb')] // darken
                    ]
                };
            });

但显示的变化不大,这里是 jsfiddle http://jsfiddle.net/jhAD8/

请看一看,

4

2 回答 2

1

不支持 3D 图表,包括您在上面发布的更改视角。但你可以投票给它http://highcharts.uservoice.com

于 2013-02-01T09:17:43.260 回答
0

Update: 3D charts are supported. To get the chart you are looking for you could set a beta angle rotation in a 3D pie chart. Demo: http://jsfiddle.net/41004emr/

$(function () {
    $('#container').highcharts({
        chart: {
            type: 'pie',
            options3d: {
                enabled: true,
                alpha: 0,
                beta: 45
            }
        },
        title: {
            text: 'Browser market shares at a specific website, 2014'
        },
        tooltip: {
            pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
        },
        plotOptions: {
            pie: {
                allowPointSelect: true,
                cursor: 'pointer',
                depth: 35,
                dataLabels: {
                    enabled: true,
                    format: '{point.name}'
                }
            }
        },
        series: [{
            type: 'pie',
            name: 'Browser share',
            data: [
                ['Firefox', 45.0],
                ['IE', 26.8],
                ['Chrome',12.8],
                ['Safari', 8.5],
                ['Opera', 6.2],
                ['Others', 0.7]
            ]
        }]
    });
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/highcharts-3d.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>

<div id="container" style="height: 400px"></div>

于 2016-08-16T15:06:29.447 回答