JSFiddle - React, Tailwind, and code Playground

Internet of Things (IoT) devices penetration

by pepperdigital

HTML

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

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

JavaScript

Highcharts.chart('container', {
    chart: {
        type: 'bar'
    },
            credits: {
        enabled: false
    },
     exporting: {
        enabled: true
    },
    colors: ['#86BC25', '#43B02A', '#046A38', '#0097A9', '#62B5E5', 
   '#00A3E0', '#0076A8', '#012169', '#2C5234', '#C4D600'],
    title: {
        text: ''
    },
     tooltip: {
        formatter: function () {
            return this.series.name +
                '<br><b>' + this.y + '%</b>';
        }
    },
    xAxis: {
        categories: [
'65-75',
'55-64', 
'45-54', 
'35-44', 
'25-34', 
'16-24', 
'All ages'
]
    },
    yAxis: {
        min: 0,
        max: 60,
        labels: {
            format: '{value}%'
        },
        title: {
            text: ''
        }
    },
    legend: {
        enabled: false
    },
    plotOptions: {
        series: {
            stacking: 'normal'
        }
    },
    series: [
    {
        
        data: [
9,
15,
25,
45,
59,
60,
{y: 36, color: '#012169'}
        ]
    }]
});