Highcharts Demo

author(s): Torstein Hønsi

by anikettiwari

HTML

<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/series-label.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"></div>

CSS

#container {
	min-width: 310px;
	max-width: 800px;
	height: 400px;
	margin: 0 auto
}

JavaScript

Highcharts.setOptions({
    lang: {
        numericSymbols: null
    }
});

Highcharts.chart('container', {
    title: {
        text: null
    },
    yAxis: {
        title: {
            text: 'Patents Per Sponsoring Party'
        },
        gridLineWidth: 0,  
    },
    xAxis: {
      title: {
        text: 'Cumulative Percentage'
      },
     tickLength: 0,
      labels: {
          formatter: function() {
           percentage  = this.value * 25;
             return percentage + "%";
          }
  },
    },
    legend: {
       enabled: false,
    },

    plotOptions: {
        series: {
            label: {
               enabled: false,
            },
        }
    },
    tooltip: {
    
      formatter: function() {
      console.log(this);
    return '<b>'+ this.percentage +'</b>: '+ Highcharts.numberFormat(this.y) +' %';
}
    },
    series: [{
        data: [1000, 2400, 3700, 4200, 5600],
         marker: {
                enabled: false
            },
         showInLegend: false,     
         lineWidth: 5
    }],
     credits: {
      enabled: false
    }
});