1. 饼状图(Pie Chart)示例:

<div ></div>
<script type="http://.....jquery-1.9.1.min.js"></script>
<script src="http://code.highcharts.com/highcharts.js"></script>
<script type="text/javascript">
$(function () {
    $('#container').highcharts({
        chart: {
            type: 'pie',
            plotBackgroundColor: 'lightgrey',
            plotBorderWidth: 2,
            plotShadow: true
        },
        title: {
            text: 'Pie chart'
        },
        colors: ['#7cb5ec','#434348','#90ed7d', 'grey'],
        credits: {
            text: 'Designed by IT Dept.'
        },
        tooltip: {
            pointFormat: '{point.name}:<b>{point.y}</b>',
            headerFormat: ''
       },
        plotOptions: {
            pie: {
               allowPointSelect: true,
               cursor: 'pointer',
               dataLabels: {
                   enabled: true
               },
               showInLegend: true
            }
       },
        series: [{
            name: 'Sales',
            data: [['A',29.9], ['B',71.5], ['C',106.4], ['D',129.2]]
        }]
    });
});
</script>
View Code

相关文章: