Highcharts Demo

author(s): Torstein Hønsi

by Vladyslav Kampov

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: "SPEED_THROUGH_WATER_AVERAGE_PER_MINUTE"
    },
    tooltip: {
        pointFormat: '{series.name} knots: <b>{point.percentage:.1f}%</b>'
    },
    plotOptions: {
        pie: {
            allowPointSelect: true,
            cursor: 'pointer',
            dataLabels: {
                enabled: true,
                format: '<b>{point.percentage:.1f} %'
            }
        }
    },
    series: [{
        colorByPoint: true,
        data: [
        {
          "name": 0,
          "y": 14.285714285714285,
          "__typename": "PieDataPoint"
        },
        {
          "name": 15,
          "y": 14.285714285714285,
          "__typename": "PieDataPoint"
        },
        {
          "name": 16,
          "y": 42.857142857142854,
          "__typename": "PieDataPoint"
        },
        {
          "name": 14,
          "y": 14.285714285714285,
          "__typename": "PieDataPoint"
        },
        {
          "name": 6,
          "y": 14.285714285714285,
          "__typename": "PieDataPoint"
        }
        ]
    }]
});