forked from winne27/flot-valuelabels
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example2.html
68 lines (64 loc) · 1.77 KB
/
example2.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
<!DOCTYPE html>
<html>
<head>
<title>Examples flot-valuelabels</title>
<meta charset="utf-8">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="https://rawgit.com/flot/flot/master/jquery.flot.js"></script>
<script src="https://rawgit.com/winne27/flot-valuelabels/master/jquery.flot.valuelabels.js"></script>
<script src="https://rawgit.com/emmerich/flot-orderBars/master/js/jquery.flot.orderBars.js"></script>
<!--
<script src="jquery.flot.valuelabels.js" type="text/javascript"></script>
-->
<script>
$(function () {
var a1 = [[0,3],[1,19],[2,15],[3,5],[4,11]];
var a2 = [[0,8],[1,6],[2,12],[3,10],[4,1]];
var a3 = [[0,3],[1,12],[2,11],[3,2],[4,13]];
var data = [{
label: "France",
data: a1,
bars: {
order: 1
},
valueLabels: {
show: true,
xoffset: -17
}
},{
label: "Germany",
data: a2,
bars: {
order: 2
},
valueLabels: {
xoffset: 0,
show: true
}
},{
label: "Italy",
data: a3,
bars: {
order: 3
},
valueLabels: {
show: true,
xoffset: 17
}
}];
$.plot($("#placeholder"), data, {
series: {
bars: {
show: true,
barWidth: 0.13
}
}
});
});
</script>
</head>
<body>
<h4>Example for using valuelabels and orderBars together</h4>
<div id="placeholder" style="width:500px;height:400px;"></div>
</body>
</html>