couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject [28/50] [abbrv] couchdb commit: updated refs/heads/1.6.x to d2ac597
Date Tue, 01 Apr 2014 17:42:10 GMT
Updating pie chart to reflect nvd3's removal of pie.values(), tweaking CSS to make pie chart
fit all nice like.


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/7296e53c
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/7296e53c
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/7296e53c

Branch: refs/heads/1.6.x
Commit: 7296e53c8dcd5d69d83bd04a4421887390c06816
Parents: b125530
Author: Christian Hogan <github@infliction.org>
Authored: Tue Mar 25 14:43:36 2014 -0400
Committer: suelockwood <deathbear@apache.org>
Committed: Tue Mar 25 15:19:18 2014 -0400

----------------------------------------------------------------------
 src/fauxton/app/addons/stats/assets/less/stats.less   | 5 +++++
 src/fauxton/app/addons/stats/templates/pie_table.html | 6 +++++-
 src/fauxton/app/addons/stats/views.js                 | 7 +++----
 3 files changed, 13 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/7296e53c/src/fauxton/app/addons/stats/assets/less/stats.less
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/stats/assets/less/stats.less b/src/fauxton/app/addons/stats/assets/less/stats.less
index 7ec88b9..43ddb3b 100644
--- a/src/fauxton/app/addons/stats/assets/less/stats.less
+++ b/src/fauxton/app/addons/stats/assets/less/stats.less
@@ -13,3 +13,8 @@
 .datatypes {
   padding: 0 15px;
 }
+
+.span5 {
+	height:450px;
+	min-width: 450px;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/couchdb/blob/7296e53c/src/fauxton/app/addons/stats/templates/pie_table.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/stats/templates/pie_table.html b/src/fauxton/app/addons/stats/templates/pie_table.html
index 1fa781a..8c4682c 100644
--- a/src/fauxton/app/addons/stats/templates/pie_table.html
+++ b/src/fauxton/app/addons/stats/templates/pie_table.html
@@ -46,5 +46,9 @@ the License.
     </table>
   </div>
 
-  <svg id="<%= datatype %>_graph"></svg>
+  <div class="span5">
+    <center>
+      <svg id="<%= datatype %>_graph"></svg>
+    </center>
+  </div>
 </div>

http://git-wip-us.apache.org/repos/asf/couchdb/blob/7296e53c/src/fauxton/app/addons/stats/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/stats/views.js b/src/fauxton/app/addons/stats/views.js
index 9dd9cbc..c8374ad 100644
--- a/src/fauxton/app/addons/stats/views.js
+++ b/src/fauxton/app/addons/stats/views.js
@@ -70,21 +70,20 @@ function(app, FauxtonAPI,Stats) {
         series = _.sortBy(series, function(d){return -d.y;});
 
         nv.addGraph(function() {
-            var width = 550,
-                height = 400;
+            var width = 440,
+                height = 440;
 
             var chart = nv.models.pieChart()
                 .x(function(d) { return d.key; })
                 .y(function(d) { return d.y; })
                 .showLabels(true)
                 .showLegend(false)
-                .values(function(d) { return d; })
                 .color(d3.scale.category10().range())
                 .width(width)
                 .height(height);
 
               d3.select(chartelem)
-                  .datum([series])
+                  .datum(series)
                 .transition().duration(300)
                   .attr('width', width)
                   .attr('height', height)


Mime
View raw message