Highcharts Demo
author(s): Torstein Hønsi
HTML
<script src="http://code.highcharts.com/highcharts.js"></script>
<div id="container" style="height: 400px"></div>
JavaScript
$(function () {
$('#container').highcharts({
chart: {
zoomType: 'xy'
},
title: {
text: 'Title'
},
subtitle: {
text: 'Source:'
},
xAxis: [{
categories: ['1','2','3','4','5']
}],
yAxis: [{ // Primary yAxis
labels: {
format: '€',
style: {
color: '#89A54E'
}
},
title: {
text: 'Hi Mom',
style: {
color: '#89A54E'
}
}
}, { // Secondary yAxis
title: {
text: 'Bye Mom',
style: {
color: '#4572A7'
}
},
labels: {
format: '%',
style: {
color: '#4572A7'
}
},
opposite: true
}],
tooltip: {
shared: true
},
legend: {
layout: 'vertical',
align: 'left',
x: 120,
verticalAlign: 'top',
y: 100,
floating: true,
backgroundColor: '#FFFFFF'
},
series: [{
name: 'One',
color: '#4572A7',
type: 'line',
yAxis: 1,
data: [1,2,3,4,5],
tooltip: {
valueSuffix: ' %'
},
zIndex:2
}, {
name: 'Two',
color: '#89A54E',
type: 'column',
data: [5,4,3,2,1],
tooltip: {
valueSuffix: ' €'
},
...