Highchart Issues

Highchart Issues

by Dumine Stefan Daniel

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

JavaScript

Highcharts.chart('container', {
    chart: {
        type: 'column'
    },
    title: {
        text: 'Issues that affects failing scenarios'
    },
    subtitle: {
        text: ''
    },
    xAxis: {
        type: 'category',
        labels: {
            rotation: -45,
            style: {
                fontSize: '13px',
                fontFamily: 'Verdana, sans-serif'
            }
        },
         title: {
            text: 'Issue'
        }
    },
    yAxis: {
        min: 0,
        title: {
            text: 'Failing scenarios'
        }
    },
      plotOptions: {
                            series: {
                                cursor: 'pointer',
                                point: {
                                    events: {
                                        click: function () {
                                            var index = this.series.xData.indexOf(event.point.x);
                                            alert(data[index]);
                                        }
                                    }
                                }
                            }
                        },
    legend: {
        enabled: false
    },
    tooltip: {
        pointFormat: 'Issue is affecting <b>{point.y}</b> failing scenarios'
    },
    series: [{
        name: 'Issues',
        data: [
            ['PISON-9999', 30],
            ['PISON-10211', 21],
            ['PISON-10212', 1],
            ['PISON-8745', 1],
            ['PISON-9555', 5],
          
        ],
        dataLabels: {
            enabled: true,
            rotation: -90,
            color: '#FFFFFF',
            align: 'right',
            format: '{point.y}', // one decimal
            y: 10, // 10 pixels down from the top
            style: {
                fontSize: '13px',
                fontFamily: 'Verdana, sans-serif'
            }
        }
    }]
});