关于Highcharts饼图的颜色填充

2021-11-21 财经 271阅读

很简单,我给你代码

HTML>



Highcharts Example
" target="_blank">http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js">

$(function () {
    $('#container').highcharts({
        chart: {
            plotBackgroundColor: null,
            plotBorderWidth: null,
            plotShadow: false
        },
        colors:[
         'red',//第一个颜色,欢迎加入Highcharts学习交流群294191384
         'blue',//第二个颜色
         'yellow',//第三个颜色
        '#1aadce', //。。。。
   '#492970',
   '#f28f43', 
   '#77a1e5', 
   '#c42525', 
   '#a6c96a'
       ],
        title: {
            text: 'Browser market shares at a specific website, 2010'
        },
        tooltip: {
         pointFormat: '{series.name}: {point.percentage:.1f}%'
        },
        plotOptions: {
            pie: {
                allowPointSelect: true,
                cursor: 'pointer',
                dataLabels: {
                    enabled: true,
                    color: '#000000',
                    connectorColor: '#000000',
                    format: '{point.name}: {point.percentage:.1f} %'
                }
            }
        },
        series: [{
            type: 'pie',
            name: 'Browser share',
            data: [
                ['Firefox',   45.0],
                ['IE',       26.8],
                ['Opera',     6.2],
            ]
        }]
    });
});



" target="_blank">http://code.highcharts.com/highcharts.js">


截图

声明:你问我答网所有作品(图文、音视频)均由用户自行上传分享,仅供网友学习交流。若您的权利被侵害,请联系fangmu6661024@163.com