Highcharts Demo
author(s):
Torstein Hønsi
by Chitkala More
HTML
<script src="https://code.highcharts.com/highcharts.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" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
JavaScript
Highcharts.chart('container', {
chart: {
type: 'areaspline'
},
title: {
text: 'Average fruit consumption during one week'
},
legend: {
layout: 'vertical',
align: 'left',
verticalAlign: 'top',
x: 150,
y: 100,
floating: true,
borderWidth: 1,
backgroundColor: (Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF'
},
xAxis: {
categories: [
'1 Aug',
'2 Aug',
'3 Aug',
'4 Aug',
'5 Aug',
'6 Aug',
'7 Aug'
],
/* plotBands: [{ // visualize the weekend
from: 4.5,
to: 6.5,
color: 'rgba(68, 170, 213, .2)'
}] */
},
yAxis: {
title: {
text: 'No. of views (in %) '
}
},
tooltip: {
shared: true,
valueSuffix: ' units'
},
credits: {
enabled: false
},
plotOptions: {
areaspline: {
fillOpacity: 0.5
}
},
series: [{
name: 'Added',
data: [25, 18, 3, 5, 4, 10, 12],
color:"#2cabe3"
}, {
name: 'Viewed',
data: [1, 3, 4, 3, 3, 5, 4],
color:"#53e69d"
}]
});