-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathchart.js
49 lines (41 loc) · 1.48 KB
/
chart.js
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
var phenologyChart = Morris.Bar({
element:"phenologyChart",
data : months,
xkey: "mois",
ykeys : ["value"],
labels: ['Observation(s)'],
xLabelAngle: 60,
hideHover: 'auto',
resize: true,
axes: true,
});
svgContainer = d3.selectAll("svg");
svgContainer.append("g")
.append("text")
.attr("transform", "rotate(-90)")
.attr("y", '0%')
.attr('x', '-15%')
.attr("dy", ".71em")
.attr("fill", "#888888")
.attr("font-size", "10px")
.style("text-anchor", "end")
.text("Observations");
rect = d3.selectAll("rect");
rect.on("mouseover", function(d) {
d3.select(this).classed("highlight", true);
d3.select(this).select("text").style("visibility", "visible");
});
rect.on("mouseout", function() {
d3.select(this).classed("highlight", false);
});
svgContainer = d3.selectAll("svg");
svgContainer.append("g")
.append("text")
.attr("transform", "rotate(-90)")
.attr("y", '0%')
.attr('x', '-15%')
.attr("dy", ".71em")
.attr("fill", "#888888")
.attr("font-size", "10px")
.style("text-anchor", "end")
.text("Observations");