diff options
author | Yves Fischer <yvesf-git@xapek.org> | 2011-12-12 00:20:51 +0100 |
---|---|---|
committer | Yves Fischer <yvesf-git@xapek.org> | 2011-12-12 00:20:51 +0100 |
commit | 5384a9f745d7aa31edc1b028a8ec0119dabdd1f5 (patch) | |
tree | 75a68f2cbbe13c8bf91e73fc24c78b0822574658 /ebus/webapp/static/src/d3.plot.js | |
parent | be57be260937f89c96bd02bac701b92cfe76184a (diff) | |
download | ebus-alt-5384a9f745d7aa31edc1b028a8ec0119dabdd1f5.tar.gz ebus-alt-5384a9f745d7aa31edc1b028a8ec0119dabdd1f5.zip |
klickbare plots
Diffstat (limited to 'ebus/webapp/static/src/d3.plot.js')
-rw-r--r-- | ebus/webapp/static/src/d3.plot.js | 13 |
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() |