JavaScript
$(function () {
var charti;
$(document).ready(function() {
charti = new Highcharts.Chart({
chart: {
renderTo: 'sales',
type: 'area'
},
title: {
text: 'Sales by source'
},
legend: {
enabled: false,
},
xAxis: {
categories: [],
dateTimeLabelFormats: {
day: '%m-%d'
},
tickmarkPlacement: 'off',
title: {
enabled: false
}
},
yAxis: {
title: {
text: 'Visits / Day'
},
labels: {
formatter: function() {
return this.value;
}
}
},
tooltip: {
formatter: function() {
return ''+
this.x +': '+ Highcharts.numberFormat(this.y, 0, ',') +' visits';
}
},
plotOptions: {
area: {
stacking: 'normal',
lineColor: '#666666',
lineWidth: 1,
marker: {
lineWidth: 1,
lineColor: '#666666'
}
}
},
series: [{
name: 'Email',
marker: {enabled: false},
fillColor: '#71a75b',
color: '#71a75b',
data: [561, 388, 1140, 899, 459, 464, 1265, 687, 365, 1287, 1044, 881, 459, 1419, 1076, 400, 323, 251, 887, 786, 1322, 1002, 517, 774, 551, 1249, 563, 1062, 800, 392, 149]
},{
name: 'Social',
marker: {enabled: false},
fillColor: '#A60F2F',
color: '#A60F2F',
data: [133, 103, 95, 68, 51, 62, 104, 58, 65, 82, 44, 31, 64, 61, 91, 51, 64, 91, 41, 77, 108, 83, 55, 69, 65, 137, 54, 84, 73, 63, 28]
},{
name: 'Paid',
marker: {enabled: false},
fillColor: '#f47f05',
color: '#f47f05',
data: [286, 242, 372, 312, 227, 272, 447, 369, 339, 370, 361, 348, 438, 455, 466, 463, 455, 516, 529, 619, 608, 591, 563, 607, 577, 561, 562, 638, 603, 603, 232]
},{
name: 'Other Referrals',
...