Highcharts Demo

author(s): Torstein Hønsi

by glam

HTML

<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://code.highcharts.com/modules/export-data.js"></script>

<div id="container" style="min-width: 310px; height: 400px; max-width: 600px; margin: 0 auto"></div>

JavaScript

Highcharts.chart('container', {
    chart: {
        plotBackgroundColor: null,
        plotBorderWidth: null,
        plotShadow: false,
        type: 'pie'
    },
    title: {
       text: 'Total Kunjungan Dari dan Ke Lampung'
    },
    tooltip: {
        pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b><br>{point.fmt}'
    },
    plotOptions: {
        pie: {
        		dataLabels: {
                distance: -50,
                color: 'white',
                format: '{point.percentage:.1f} %<br>{point.fmt}',
            },
            allowPointSelect: true,
            cursor: 'pointer',
            showInLegend: true,
        }
    },
    series: [{
        name: 'Brands',
        colorByPoint: true,
        data: [{
            name: 'Dari Lampung',
            y: 15652437,
            color: '#fc0',
            fmt: '15.652.437',
            selected: true,
            sliced: true
        }, {
            name: 'Ke Lampung',
            y: 13933207,
            color: '#b42a28',
            fmt: '13.933.207'
        }]
    }],
     credits: {
      enabled: false
    }
});