Highcharts Demo

author(s): Torstein Hønsi

by Max Shu

HTML

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

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

JavaScript

Highcharts.chart('container', {

    title: {
        text: ''
    },
    subtitle: {
        text: ''
    },
    xAxis: [{
        categories: [2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018],
    }],
    yAxis: { 
        labels: {
            format: '{value}',
        },
        title: {
            text: '',
        },
    },
    tooltip: {
        shared: true,
        /* headerFormat: '', */
        pointFormat: '{series.name}: <b>{point.y}</b>',
    },
    legend: {
        layout: 'vertical',
        align: 'left',
        x: 40,
        verticalAlign: 'top',
        /* y: 50, */
        floating: true,
        
    },
    series: [{
        name: 'Вузов в рейтинге',
        type: 'column',
        /* yAxis: 1, */
        data: [7, 9, 14, 18, 21, 21, 22, 24, 27],

    }, {
        name: 'Позиция ВШЭ среди российских вузов',
        type: 'scatter',
        data: [
          {name:'5', y:7-5},
          {name:'8', y:9-8},
          {name:'7', y:14-7},
          {name:'9', y:18-9},
          {name:'11', y:21-11},
          {name:'10', y:21-10},
          {name:'11', y:22-11},
          {name:'9', y:24-9},
          {name:'8', y:27-8}
        ],
        tooltip: {
            headerFormat: '<span style="font-size: 10px"> {series.name}<br></span>',
            headerFormat: '',
            pointFormat: '<b>{point.name} место</b>',
        },

    }]
});