From bcf2d2fea64340412c0e2ffa9be565f21e3c4fde Mon Sep 17 00:00:00 2001 From: Freeyorp Date: Thu, 2 May 2013 21:59:34 +1200 Subject: Pack pie charts in tighter --- css/style.css | 10 ++++++++-- index.html | 8 ++++---- js/mv/chart.js | 14 ++++++++++---- 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/css/style.css b/css/style.css index 8571fa9..0d2ec08 100644 --- a/css/style.css +++ b/css/style.css @@ -26,8 +26,15 @@ body { font-size: smaller; } -.side { +.med { width: 400px; +} + +.thin { + width: 250px; +} + +.side { font-size: smaller; } @@ -35,7 +42,6 @@ body { #loadinfo { width: 647px; -/* height: 400px; */ border: 1px grey solid; margin: auto; } diff --git a/index.html b/index.html index c621789..168a4dd 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ -
+

Instance breakdown by Character Base Level

@@ -15,16 +15,16 @@
-
+
-

Instance breakdown by Type

-

Instance breakdown by Target

Instance breakdown by Weapon

+
+

Instance breakdown by Type

Definedness of records [?]

diff --git a/js/mv/chart.js b/js/mv/chart.js index 74d7b85..779a612 100644 --- a/js/mv/chart.js +++ b/js/mv/chart.js @@ -13,7 +13,7 @@ var mv = function(mv) { mv.charts.pc = bar(monoGroup(wide(dc.barChart("#player-chart")), "pc")) .x(d3.scale.linear().domain([mv.heap.pc.dim.bottom(1)[0].pc, mv.heap.pc.dim.top(1)[0].pc]).nice()) ; - mv.charts.blvl = bar(monoGroup(thin(dc.barChart("#blvl-chart")), "blvl")) + mv.charts.blvl = bar(monoGroup(med(dc.barChart("#blvl-chart")), "blvl")) .x(d3.scale.linear().domain([0, mv.heap.blvl.dim.top(1)[0].pcstat.blvl])) ; mv.charts.type = pie(monoGroup(dc.pieChart("#type-chart"), "type")) @@ -71,11 +71,16 @@ var mv = function(mv) { .width(700) ; } - function thin(chart) { + function med(chart) { return chart .width(380) ; } + function thin(chart) { + return chart + .width(250) + ; + } function short(chart) { return chart .height(130) @@ -89,6 +94,7 @@ var mv = function(mv) { return chart .dimension(mv.heap[name].dim) .group(mv.heap[name].group) + .transitionDuration(500) ; } function bar(chart) { @@ -101,8 +107,8 @@ var mv = function(mv) { ; } function pie(chart) { - return thin(short(chart)) - .radius(60) + return thin(chart) + .radius(90) .colorCalculator(d3.scale.category20c()) ; } -- cgit v1.2.3-60-g2f50