JavaScript
Highcharts.chart('container', {
chart: {
type: 'scatter',
zoomType: 'xy'
},
title: {
text: 'Height Versus Weight of 507 Individuals by Gender'
},
subtitle: {
text: 'Source: Heinz 2003'
},
xAxis: { categories: [ 'Jan 15' , 'Jan 16' , 'Jan 17' , 'Jan 18' , 'Jan 19' , 'Jan 20' ],
title: {
enabled: true,
text: 'Height (cm)'
},
startOnTick: true,
endOnTick: true,
showLastLabel: true
},
yAxis: {
title: {
text: 'Weight (kg)'
}
},
legend: {
layout: 'vertical',
align: 'left',
verticalAlign: 'top',
x: 100,
y: 70,
floating: true,
backgroundColor: (Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF',
borderWidth: 1
},
plotOptions: {
scatter: {
marker: {
radius: 5,
states: {
hover: {
enabled: true,
lineColor: 'rgb(100,100,100)'
}
}
},
states: {
hover: {
marker: {
enabled: false
}
}
},
tooltip: {
headerFormat: '<b>{series.name}</b><br>',
pointFormat: '{point.x} cm, {point.y} kg'
}
}
},
series: [{data: [{x: 15, y:27 , name: 'person', role: 'Agent'}
,
{x: 15, y:13 , name: 'person', role: 'Agent'}
,
{x: 14.97, y:22 , name: 'person', role: 'Agent'}
,
{x: 15.02, y:30 , name: 'person', role: 'Agent'}
,
{x: 15.05, y:16 , name: 'person', role: 'Agent'}
,
{x: 14.96, y:26 , name: 'person', role: 'Agent'}
,
{x: 14.96, y:71 , name: 'person', role: 'Agent'}
,
{x: 15.06, y:41 , name: 'person', role: 'Agent'}
,
{x: 15.01, y:12 , name: 'person', role: 'Agent'}...