Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/454.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 删除highcharts饼图中的边距_Javascript_Jquery_Highcharts - Fatal编程技术网

Javascript 删除highcharts饼图中的边距

Javascript 删除highcharts饼图中的边距,javascript,jquery,highcharts,Javascript,Jquery,Highcharts,我正在尝试删除饼图的默认高度。这是我使用的代码 我想将黄色背景容器的大小减小到图表的高度。 这是我正在使用的代码 $(function () { $('#container').highcharts({ chart: { backgroundColor: 'yellow', margin: [0, 0, 0, 0] }, title: { text: 'In<br&

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

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

$(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]
            ]
        }]
    });
});
为什么不使用solidgauge?或者:设置饼图和中心的大小:[50%,100%],请参见:-大小=200%,因为您只显示饼图的一半。如果这就是完整的馅饼,那么100%就足够了。