From 6ba3f63491edca5aaa6a8fef290021df760deac1 Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Sun, 3 Jan 2016 23:56:22 -0800 Subject: [PATCH] Drop the SVG rendering; planning to use Google Charts instead. --- static/babystats.js | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/static/babystats.js b/static/babystats.js index 494ce29..fa370e9 100644 --- a/static/babystats.js +++ b/static/babystats.js @@ -945,25 +945,6 @@ BabyStats.prototype.updateDisplayDate_ = function(message) { dateObj.appendChild(dateTitle); dateTitle.textContent = date.toLocaleDateString() + ' (' + days[date.getDay()] + ')'; - - var svgns = 'http://www.w3.org/2000/svg'; - var svg = document.createElementNS(svgns, "svg"); - svg.setAttributeNS(null, 'viewBox', '0 0 500 ' + (this.tiles_.length * 10)); - svg.setAttributeNS(null, 'preserveAspectRatio', 'none'); - svg.style.display = 'block'; - svg.style.width = '100%'; - for (var i = 0; i < this.tiles_.length; i++) { - var line = document.createElementNS(svgns, 'line'); - line.setAttributeNS(null, 'x1', 0); - line.setAttributeNS(null, 'x2', 500); - line.setAttributeNS(null, 'y1', i * 10 + 5); - line.setAttributeNS(null, 'y2', i * 10 + 5); - line.setAttributeNS(null, 'stroke', - i % 2 ? 'rgb(233,127,2)' : 'rgb(248,202,0)'); - line.setAttributeNS(null, 'stroke-width', 1); - svg.appendChild(line); - } - dateObj.appendChild(svg); } };