JOB PREF 3

COLLEGE DASHOARD

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
            },
    title: {
        text: 'Campus Placement Preferences'
    },
    xAxis: {
        categories: ['BACHELOR', 'MASTER', 'DIPLOMA', 'DOCTORATE'],
       
         labels: {
             enabled: true
         },
         minorTickLength: 0,
         tickLength: 0
          },
    yAxis: {
        min: 0,
        title: {
            text: ''
        },
        gridLineColor: 'transparent'
    },
    legend: {
        reversed: true
    },
   /* tooltip: {
        formatter: function() {
            return  this.x +
                   '</b> is <b>'+ this.y% +'</b> of total 100%';
          },
    },*/
    tooltip: {
                        headerFormat: '<span style="font-size:11px">{series.name}</span><br>',
                        pointFormat: '<span style="color:{point.color}"></span> <b>{point.y}%</b> of total 100%<br/>'
                    },
    plotOptions: {
        series: {
            stacking: 'percent'
        }
    },
    series: [{
        name: 'NO',
        color:'#70d8ff',
        data: [50, 30, 40, 70]
    }, {
        name: 'YES',
        color:'#1d3166',
        data: [50, 70, 60, 30]
    }]
});