删除highcharts饼中的边距

时间:2015-02-25 01:58:30

标签: javascript jquery highcharts

我正在尝试删除饼图的默认高度。这是使用

的代码

http://jsfiddle.net/554vf8te/

我想将背景容器的大小以黄色缩小到仅图表的高度。 这是我正在使用的代码。

$(function () {
    $('#container').highcharts({
       chart: {
            backgroundColor: 'yellow',
            margin: [0, 0, 0, 0]
        },
        title: {
            text: 'In<br>Progress',
            align: 'center',
            verticalAlign: 'middle',
            y: 50
        },
        tooltip: {
            pointFormat: ''
        },
        plotOptions: {
            pie: {
                dataLabels: {
                    enabled: true,
                    distance: -50,
                    style: {
                        fontWeight: 'bold',
                        color: 'white',
                        textShadow: '0px 1px 2px black'
                    }
                },
                borderWidth: 0,
                startAngle: -90,
                endAngle: 90,
                center: ['50%', '75%']
            }
        },
        colors: ['#88ad34', '#333'],
        series: [{
            type: 'pie',
            name: 'Browser share',
            innerSize: '80%',
            data: [
                ['',   75],
                ['',       25]
            ]
        }]
    });
});

0 个答案:

没有答案