January 2015
Intermediate to advanced
478 pages
10h 7m
English
Highcharts also supports a scatter chart that enables us to plot the data trend from a large set of data samples. Here we are going to use the scatter series differently, which makes our chart a bit like a poster chart.
First, we are going to use a subset of the 'Ages 0 to 14' data and set the series to the scatter type:
name: 'Ages 0 to 14',
type: 'scatter',
data: [ [ 1982, 23 ], [ 1989, 19 ],
[ 2007, 14 ], [ 2004, 14 ],
[ 1997, 15 ], [ 2002, 14 ],
[ 2009, 13 ], [ 2010, 13 ] ]Then, we will enable the data labels for the scatter series and make sure the marker shape is always 'circle', as follows:
plotOptions: {
scatter: {
marker: {
symbol: 'circle'
},
dataLabels: {
enabled: true
}
}
}The preceding code snippet ...
Read now
Unlock full access