JavaScript
Highcharts.chart('container', {
chart: {
type: 'scatter',
plotBackgroundColor: '#C8E4f7'
},
title: {
text: 'Average annual total return',
align: 'left',
style: {
fontSize: '14px'
}
},
credits: {
enabled: false
},
legend: {
enabled: false
},
xAxis: {
min: 9,
max: 21,
gridLineWidth: 0,
tickWidth: 0,
lineWidth: 0,
tickPositions: [9, 11, 13, 15, 17, 19, 21],
title: {
text: 'Volatility (%)'
},
plotLines: [{
color: '#FFFFFF',
width: 1,
value: 15
}, {
color: '#FFFFFF',
width: 0,
value: 9,
zIndex: 5,
label: {
text: 'Lower return, lower volatility',
rotation: 0,
verticalAlign: 'bottom',
x: 10,
y: -10,
style: {
fontWeight: 'bold'
}
}
}, {
color: '#FFFFFF',
width: 0,
value: 9,
zIndex: 5,
label: {
text: 'Higher return, lower volatility',
rotation: 0,
verticalAlign: 'top',
x: 10,
y: 15,
style: {
fontWeight: 'bold'
}
}
}, {
color: '#FFFFFF',
width: 0,
value: 21,
zIndex: 5,
label: {
align: 'right',
text: 'Higher return, lower volatility',
rotation: 0,
verticalAlign: 'bottom',
x: -10,
y: -10,
style: {
fontWeight: 'bold'
}
}
}, {
color: '#FFFFFF',
width: 0,
value: 21,
zIndex: 5,
label: {
align: 'right',
text: 'Higher return, higher volatility - A very ver very very very very very very very long label',
rotation: 0,
verticalAlign: 'top',
x: -10,
y: 15,
style: {
fontWeight: 'bold'
}
}
}]
},
yAxis: {
min: 0,
max: 12,
gridLineWidth: 0,
tickInterval: 2,
title: {
text: ''
},
plotLines: [{
...