Highcharts Demo
author(s):
Torstein Hønsi
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.chart('container', {
chart: {
type: 'bar',
backgroundColor: '#000000',
style: {
fontFamily: 'monospace',
color: "#f00" // This line won't work. You must set color for each element like title, axis labels ...
}
},
title: {
text: 'Chart Title'
},
xAxis: {
categories: ['Category1','Category2']
},
yAxis: {
title: {
text: 'Value'
},
type: 'logarithmic'
},
series: [{
name: 'Cat1',
data: [4.2] // cat 1 is too small to be seen near cat 2
},
{
name: 'Cat2',
data: [5691.7]
}
]
});