From b52c031e44300a085ce29bbe4431be5460c8c453 Mon Sep 17 00:00:00 2001 From: Michael Hanke Date: Wed, 1 May 2013 10:12:07 +0200 Subject: [PATCH] Actual chart was missing --- sphinx/_static/subscriptionchart.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 sphinx/_static/subscriptionchart.js diff --git a/sphinx/_static/subscriptionchart.js b/sphinx/_static/subscriptionchart.js new file mode 100644 index 0000000..5320f0a --- /dev/null +++ b/sphinx/_static/subscriptionchart.js @@ -0,0 +1,25 @@ +d3.json('/_files/nd_subscriptionstats.json', function(data) { + nv.addGraph(function() { + chart = nv.models.stackedAreaChart() + .x(function(d) { return d[0] }) + .y(function(d) { return d[1] }) + .clipEdge(true); + + chart.stacked.style('expand'); + + chart.xAxis + .tickFormat(function(d) { + return d3.time.format('%d %b %Y')(new Date(d)) }); + + chart.yAxis + .tickFormat(d3.format(',.2f')); + + d3.select('#subscriptionchart') + .datum(data) + .transition().duration(500).call(chart); + + nv.utils.windowResize(chart.update); + + return chart; + }); +}) -- 2.39.2