summaryrefslogtreecommitdiff
path: root/ebus/webapp/static/src/d3.plot.js
diff options
context:
space:
mode:
Diffstat (limited to 'ebus/webapp/static/src/d3.plot.js')
-rw-r--r--ebus/webapp/static/src/d3.plot.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/ebus/webapp/static/src/d3.plot.js b/ebus/webapp/static/src/d3.plot.js
index e50cb5e..d9a7d04 100644
--- a/ebus/webapp/static/src/d3.plot.js
+++ b/ebus/webapp/static/src/d3.plot.js
@@ -4,16 +4,21 @@ function d3_plot(container) {
this.opt = {
w:550, h:200, margin:30
};
- this.element = container.append("svg:svg")
+ this.element = container.append("svg:g")
.classed("d3.plot_plot",true)
.attr("width", this.opt.w)
.attr("height", this.opt.h);
-
+
+ this.element.append("svg:rect")
+ .attr("width", this.opt.w)
+ .attr("height", this.opt.h)
+ .style("fill", "white");
+
this.element.append("svg:text")
.classed("d3-plot_wait", true)
.attr("x", this.opt.w/2)
.attr("y", this.opt.h/2)
- .attr("text-anchor", "middle")
+ .attr("text-anchor", "center")
.text("Bitte warten");
};
@@ -59,7 +64,7 @@ d3_plot.prototype = {
.text(function(d){return tick_format(d);})
.attr("x", function(d) {return x(d);})
.attr("y", -5)
- .attr("text-anchor", "middle");
+ .attr("text-anchor", "center");
g.selectAll(".ylabel")
.data(y.ticks(5)).enter()