JSFiddle - React, Tailwind, and code Playground

Pass Rates Highcharts

by Dumine Stefan Daniel

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; height: 400px; margin: 0 auto"></div>

JavaScript

Highcharts.chart('container', {
colors: ['red','grey','green'],
    chart: {
        type: 'column'
    },
    title: {
        text: 'Pass Rates'
    },
    xAxis: {
        categories: ['Login', 'AddNewReport', 'Clusters', 'Alarms', 'Reports']
    },
    yAxis: {
        min: 0,
        title: {
            text: 'Total percentage (%)'
        }
    },
    tooltip: {
        pointFormat: '<span style="color:{series.color}">{series.name}</span>: <b>{point.y}</b> ({point.percentage:.0f}%)<br/>',
        shared: true
    },
    plotOptions: {
        column: {
            stacking: 'percent'
        }
    },
    series: [{
        name: 'Failed',
        data: [5, 3, 4, 7, 2]
    }, {
        name: 'Existing',
        data: [2, 2, 3, 2, 1]
    }, {
        name: 'Passed',
        data: [3, 4, 4, 2, 5]
    }]
});