JavaScript
Highcharts.chart('container', {
chart: {
type: 'scatter',
zoomType: 'xy'
},
title: {
text: 'GDP per capita vs Self-reported Life Satisfaction, 2015'
},
subtitle: {
useHTML: true,
text: 'Source: <a href=" http://data.worldbank.org/data-catalog/world-development-indicators">Worldbank</a>'
},
yAxis: {
title: {
text: 'Life satisfaction (country average; 0-10)'
}
},
xAxis: {
title: {
text: 'GDP per capita'
}
},
tooltip: {
useHTML: true,
headerFormat: null,
pointFormat: '<b>Country</b>: {point.name}<br><b>GDP per capita</b>: {point.x} $<br/><b>Life satisfaction</b>: {point.y}',
positioner:function(){return{x:350, y:190}}
},
legend: {
enabled: false
},
series: [{
keys: ['x', 'y', 'name'],
data: [
[1747.98, 3.98, 'Afghanistan'],
[11024.92, 4.61, 'Albania'],
[19101.3, 6.7, 'Argentina'],
[8180.05, 4.35, 'Armenia'],
[43832.43, 7.31, 'Australia'],
[44074.95, 7.08, 'Austria'],
[16698.86, 5.15, 'Azerbaijan'],
[44456.22, 6.01, 'Bahrain'],
[3132.57, 4.63, 'Bangladesh'],
[17229.55, 5.72, 'Belarus'],
[41723.12, 6.9, 'Belgium'],
[1987.17, 3.62, 'Benin'],
[7735.63, 5.08, 'Bhutan'],
[6531.52, 5.83, 'Bolivia'],
[10902.12, 5.12, 'Bosnia and Herzegovina'],
[15356.46, 3.76, 'Botswana'],
[14666.02, 6.55, 'Brazil'],
[17000.07, 4.87, 'Bulgaria'],
[1550.85, 4.42, 'Burkina Faso'],
[3290.95, 4.16, 'Cambodia'],
[2991.19, 5.04, 'Cameroon'],
[42983.1, 7.41, 'Canada'],
[2047.64, 4.32, 'Chad'],
[22536.62, 6.53, 'Chile'],
[13569.89, 5.3, 'China'],
[12985.38, 6.39, 'Colombia'],
[5542.89, 4.69, 'Congo'],
[14914.21, 6.85, 'Costa Rica'],
[20635.98, 5.21, 'Croatia'],
[30382.56, 5.44, 'Cyprus'],
[30380.59, 6.61, 'Czech Republic'],
[750.5, 3.9, 'Democratic Republic of Congo'],
[45483.76, 7.51,...