ElementStacks
by hfrntt
HTML
<script src="http://highcharts.com/js/testing.js"></script>
<div id="container" style="height: 400px; width: 500px"></div>
JavaScript
new Highcharts.Chart({
chart: {
renderTo: 'container',
defaultSeriesType: 'scatter',
zoomType: 'xy'
},
title: {
text: 'Weight '
},
xAxis: {
min: 0,
title: {
enabled: true,
text: 'Days of the Year'
},
startOnTick: true,
endOnTick: true,
showLastLabel: true,
},
yAxis: {
min: 0,
startOnTick: false,
labels: {
formatter: function() {
return this.value +' kg';
}
},
title: {
text: 'Weight kg'
}
},
tooltip: {
formatter: function() {
var d = new Date(this.x);
var monthNames = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
return ' '+ d.getDate() +' '+ monthNames[d.getMonth()] +' , '+ this.series.name + ' ' + this.y +' kg';
}
},
legend: {
layout: 'vertical',
align: 'left',
verticalAlign: 'top',
x: 70,
y: 10,
floating: true,
backgroundColor: '#FFFFFF',
borderWidth: 1
},
plotOptions: {
scatter: {
marker: {
radius: 5,
states: {
hover: {
enabled: true,
lineColor: 'rgb(100,100,100)'
}
}
},
states: {
hover: {
marker: {
enabled: false
}
}
}
}
},
series: [{
data: [43,26,85,43,39,65]
}]
});