Highcharts test tool

by oysteinmoseng

HTML

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

<div id="container"></div>

CSS

#container {
    min-width: 300px;
    max-width: 800px;
    height: 500px;
    margin: 1em auto;
}

JavaScript

Highcharts.chart('container', {
  	title: {
    		text: 'Most Popular Chart Types'
    },

    subtitle: {
    		text: 'Highcharts Cloud'
    },
    
    tooltip: {
    		headerFormat: '',
        pointFormat: '{point.name}: <b>{point.y} charts</b>'
    },

    chart: {
    		type: 'pie'
    },

    series: [{
      	dataLabels: {
        	enabled: true,
        	format: '<b>{point.name}</b>: {point.percentage:.1f} %',
        	style: {
          	color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
        	}
        },
        data: [{
        		y: 39858,
          	name: 'Column'
        	}, {
        		y: 19648,
          	name: 'Line'
        	}, {
        		y: 15060,
          	name: 'Line/combination'
        	}, {
        		y: 10588,
          	name: 'Pie'
        	}, {
        		y: 4200,
          	name: 'Area'
        	}, {
        		y: 4056,
          	name: 'Spline'
        	}, {
        		y: 923,
          	name: 'Scatter'
        	}, {
        		y: 401,
          	name: 'Bubble'
        	}, {
        		y: 953,
          	name: 'Other'
        	}
        ]
    }]
});