JSFiddle - React, Tailwind, and code Playground

Outcome for previous smartphone subsequent to buying or receiving current one

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: false
    },
    colors: ['#0097A9'],
    title: {
        text: ''
    },
     tooltip: {
        formatter: function () {
            return this.series.name +
                '<br><b>' + this.y + '%</b>';
        }
    },
    xAxis: {
        categories: [
'Kept it as a spare',
'Gave it to a family member or friend',
'Sold it online to a phone', 'recycling/refurbishing company',
'Sold it online through a marketplace website',
'Sold it to a retail shop',
'Sold it/traded it in for a new phone to the mobile operator',
'Sold it/traded it in for a new phone to the device manufacturer',
'Sold it to a family member or friend',
'Recycled it in another way',
'I did not have a mobile phone before',
'Returned it to my employer',
'It was stolen',
'Lost it',
'Threw it away',
'Can not remember',
'Other'
]
    },
    yAxis: {
        min: 0,
        max: 40,
        labels: {
            format: '{value}%'
        },
        title: {
            text: ''
        }
    },
    legend: {
        enabled: false
    },
    plotOptions: {
        series: {
            stacking: 'normal'
        }
    },
    series: [
    {
        
        data: [
37,
22,
7,
5,
3,
3,
2,
2,
4,
1,
1,
1,
1,
4,
3,
4
        ]
    }]
});