JavaScript
new Taucharts.Chart({
data: data(),
type: 'line',
x: 'longitude',
y: 'latitude',
text: 'place',
size: 'survivors',
split: 'group',
color: 'direction',
guide: {
showGridLines: 'x',
x: { nice: false },
y: { nice: false },
size: {
func: 'linear',
minSize: 1,
maxSize: 12
},
color: {
brewer: {
'Place': 'rgba(0,0,0,0)', // use transparent color for workaround
'Advance': '#FF0000',
'Retreat': '#000000'
}
}
},
plugins: [
// tauCharts.api.plugins.get('legend')(),
Taucharts.api.plugins.get('tooltip')()
]
}).renderTo('#target');
function data() {
return [
[24.0, 55.0, 4000, 'P', '0', 'Kowno'],
[25.3, 54.7, 4000, 'P', '0', 'Wilna'],
[26.4, 54.4, 4000, 'P', '0', 'Smorgon'],
[26.8, 54.3, 4000, 'P', '0', 'Molodechno'],
[27.7, 55.2, 4000, 'P', '0', 'Gloubokoe'],
[27.6, 53.9, 4000, 'P', '0', 'Minsk'],
[28.5, 54.3, 4000, 'P', '0', 'Studienska'],
[28.7, 55.5, 4000, 'P', '0', 'Polotzk'],
[29.2, 54.4, 4000, 'P', '0', 'Bobr'],
[30.2, 55.3, 4000, 'P', '0', 'Vitebsk'],
[30.4, 54.4, 4000, 'P', '0', 'Orscha'],
[30.4, 53.9, 4000, 'P', '0', 'Mohilow'],
[32.0, 54.8, 4000, 'P', '0', 'Smolensk'],
[34.3, 55.2, 4000, 'P', '0', 'Wixma'],
[34.4, 55.5, 4000, 'P', '0', 'Chjat'],
[36.0, 55.5, 4000, 'P', '0', 'Mojaisk'],
[37.6, 55.8, 4000, 'P', '0', 'Moscow'],
[36.6, 55.3, 4000, 'P', '0', 'Tarantino'],
[36.5, 55.0, 4000, 'P', '0', 'Malo-jarosewli'],
[24.0, 54.9, 340000, 'A', '1'],
[24.5, 55.0, 340000, 'A', '1'],
[25.5, 54.5, 340000, 'A', '1'],
[26.0, 54.7, 320000, 'A', '1'],
[27.0, 54.8, 300000, 'A', '1'],
[28.0, 54.9, 280000, 'A', '1'],
...