couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kxe...@apache.org
Subject [46/50] [abbrv] fauxton commit: updated refs/heads/import-master to b32c617
Date Tue, 01 Apr 2014 09:15:02 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-fauxton/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/50731ba1
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/50731ba1
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/50731ba1

Branch: refs/heads/import-master
Commit: 50731ba156c9228e3267020e2fc0dd7f6df653b3
Parents: 2626dc7
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

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


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/50731ba1/app/addons/stats/assets/less/stats.less
----------------------------------------------------------------------
diff --git a/app/addons/stats/assets/less/stats.less b/app/addons/stats/assets/less/stats.less
index 7ec88b9..43ddb3b 100644
--- a/app/addons/stats/assets/less/stats.less
+++ b/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-fauxton/blob/50731ba1/app/addons/stats/templates/pie_table.html
----------------------------------------------------------------------
diff --git a/app/addons/stats/templates/pie_table.html b/app/addons/stats/templates/pie_table.html
index 1fa781a..8c4682c 100644
--- a/app/addons/stats/templates/pie_table.html
+++ b/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-fauxton/blob/50731ba1/app/addons/stats/views.js
----------------------------------------------------------------------
diff --git a/app/addons/stats/views.js b/app/addons/stats/views.js
index 9dd9cbc..c8374ad 100644
--- a/app/addons/stats/views.js
+++ b/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