JavaScript
$(function () {
var chart = new Highcharts.Chart({
chart: {
renderTo: 'container',
type: 'boxplot'
},
title: {
text: 'Box and Whiskers'
},
legend: {
enabled: false
},
xAxis: {
categories: ['Your Response', 'All', 'Industry', 'Region', 'Revenue'],
title: {
text: '2013 - Total Outside Spend'
}
},
yAxis: {
title: {
text: ' In USD'
},
plotLines: [{
value: 932,
color: 'red',
width: 1,
label: {
text: 'Total mean: 932',
align: 'center',
style: {
color: 'gray'
}
}
}]
},
series: [{
name: 'Total Outside Spend',
data: [
[760, 990, 1029, 1290, 1350],
[733, 853, 939, 980, 1080],
[714, 762, 817, 870, 918],
[724, 910, 1100, 1390, 1500],
[834, 980, 1024, 1230, 1400]
],
}, {
name: 'Your Response',
color: Highcharts.getOptions().colors[0],
type: 'scatter',
data: [ // x, y positions where 0 is the first category
[0, 990],
[1, 990],
[2, 990],
[3, 990],
[4, 990]
],
marker: {
fillColor: 'red',
lineWidth: 1,
lineColor: Highcharts.getOptions().colors[1]
},
tooltip: {
pointFormat: 'Your Company: {point.y}'
}
}]
});
$('#update').click(function () {
chart.series[0].points[0].update([733, 853, 939, 980, 1080]);
chart.series[0].points[1].update([733, 853, 939, 980, 1080]);
chart.series[0].points[2].update([714, 762, 817, 870, 918]);
chart.series[0].points[3].update([724, 910, 1100, 1390,...