From 67c8c1c7ebb9c765004e4eed562e602413d1ac52 Mon Sep 17 00:00:00 2001 From: Freeyorp Date: Sun, 2 Jun 2013 02:16:57 +1200 Subject: Plot xp instances as map chart y axis --- public/index.html | 3 +-- public/js/mv/chart.js | 4 ++-- public/js/mv/heap.js | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/public/index.html b/public/index.html index 733f7b5..fe92543 100644 --- a/public/index.html +++ b/public/index.html @@ -53,8 +53,7 @@

Map

-

The larger the bubble, the more XP instances for that map.

-
Total job XP gain
+
XP instances
Total level XP gain
diff --git a/public/js/mv/chart.js b/public/js/mv/chart.js index ebb62da..3a6cafa 100644 --- a/public/js/mv/chart.js +++ b/public/js/mv/chart.js @@ -53,9 +53,9 @@ var mv = function(mv) { /* X */ .keyAccessor(function(d) { return d.value.e + 1; }) /* Y */ - .valueAccessor(function(d) { return d.value.j + 1; }) + .valueAccessor(function(d) { return d.value.r + 1; }) /* R */ - .radiusValueAccessor(function(d) { return Math.sqrt(d.value.r); }) + .radiusValueAccessor(function(d) { return 1; }) .maxBubbleRelativeSize(0.045) .x(d3.scale.log().domain([1, 100000])) .y(d3.scale.log().domain([1, 300000])) diff --git a/public/js/mv/heap.js b/public/js/mv/heap.js index 4ba5c06..35385e0 100644 --- a/public/js/mv/heap.js +++ b/public/js/mv/heap.js @@ -7,7 +7,7 @@ var mv = function(mv) { heap.init = function() { function ea(p, d) { p.e += d.e; p.j += d.j; p.r++; return p; } function es(p, d) { p.e -= d.e; p.j -= d.j; p.r--; return p; } - function ez(p, d) { return { e: 0, j: 0, r: 0 }; } + function ez(p, d) { return { e: 0, j: 0, r: 0, str: 0, agi: 0 }; } heap.cfdata = crossfilter(mv.parser.records); heap.all = heap.cfdata.groupAll().reduce(ea, es, ez); monoGroup("date", function(d) { return d3.time.hour.round(d.date); }); -- cgit v1.2.3-60-g2f50