Highcharts Pie Chart demo




<div id="container" style="width: 600px; height: 550px; margin: 0 auto"></div>
<script language="JavaScript">
    var beginTime = "2016-12-06 16:54";
    var endTime = "2017-01-06 16:54";
    $(document).ready(function() {
        var chart =
            plotBackgroundColor: null,
            plotBorderWidth: null,
            plotShadow: false
        };
        var title = {
            text: beginTime+' ~ '+endTime
        };
        //mouse display
        var tooltip = {
            pointFormat: '{series.name}: <b>{point.y}</b><br/>总调用次数:{point.total}'
        };
        //display outside the pie chart
        var plotOptions = {
            pie: {
                allowPointSelect: true,
                cursor: 'pointer',
                dataLabels: {
                    enabled: true,
                    format: '<b>{point.name}</b>: {point.percentage:.1f}%'
                },
                showInLegend: true
            }
        };
        var series = [{
            type: 'pie',
            name: 'Number of calls',
            data: [
                {
                    name: "Overdue platform query",
                    and: 100
                },
                {
                    name: "Face comparison",
                    and: 20
                },
                {
                    name: "Bank Account Verification",
                    and: 300
                },
                {
                    name: "Court Notice Details",
                    and: 4
                },
                {
                    name: "Business Card Recognition",
                    and: 50
                },
                {
                    name: "Business License Identification",
                    and: 6
                }
            ]
        }];

        var json = {};
        json.chart = chart;
        json.title = title;
        json.tooltip = tooltip;
        json.series = series;
        json.plotOptions = plotOptions;
        $('#container').highcharts(json);
    });
</script>

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326880708&siteId=291194637