-
Notifications
You must be signed in to change notification settings - Fork 0
/
Strasbourg.html
82 lines (66 loc) · 1.86 KB
/
Strasbourg.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="http://code.highcharts.com/highcharts.js"></script>
<style>
.highcharts-tooltip span {
height:auto;
width:70px;
white-space:normal !important;
}
</style>
<div id="container" style="width: 180px; height: 280px; margin-left:-18;"></div>
<script>
$(document).ready(function () {
$('#container').highcharts({
chart: {
type: 'column'
},
title: {
text: 'Mun. 2008'
},
subtitle: {
text: 'Source: data.gouv.fr'
},
xAxis: {
categories: [
'PS',
'UMP'
]
},
yAxis: {
min: 0,
title: {
text: 'Voix (%)'
}
},
tooltip: {
headerFormat: '<span style="font-size:16px; width:75px;">{point.key}</span><table>',
pointFormat: '<tr><td style="padding:0"><b>{point.y:.1f} %</b></td></tr>',
shared: true,
useHTML: true
},
plotOptions: {
column: {
pointPadding: 0.2,
borderWidth: 0
}
},
series: [{
showInLegend: false,
name:'Voix',
data: [{y:58.3,color:'#fc83b4'}, {y:41.7,color:'#4176e8'}],
dataLabels: {
enabled: true,
rotation: -90,
color: '#FFFFFF',
align: 'right',
x: 4,
y: 10,
style: {
fontSize: '13px',
fontFamily: 'Verdana, sans-serif',
textShadow: '0 0 3px black'
}}
}]
});
});
</script>