diff options
author | Freeyorp <TheFreeYorp@NOSPAM.G.m.a.i.l.replace> | 2013-06-02 02:16:13 +1200 |
---|---|---|
committer | Freeyorp <TheFreeYorp@NOSPAM.G.m.a.i.l.replace> | 2013-06-02 02:16:13 +1200 |
commit | 3317e8a6835bd4dee20becbd0c78ff06312fc558 (patch) | |
tree | 0cdd966e4cc6e228c361620622e253dc6be862f6 | |
parent | 23841aa444173afcf8e10b8ef67f4f7f29829225 (diff) | |
download | manavis-3317e8a6835bd4dee20becbd0c78ff06312fc558.tar.gz manavis-3317e8a6835bd4dee20becbd0c78ff06312fc558.tar.bz2 manavis-3317e8a6835bd4dee20becbd0c78ff06312fc558.tar.xz manavis-3317e8a6835bd4dee20becbd0c78ff06312fc558.zip |
Plot average str as map chart y axis
-rw-r--r-- | public/index.html | 3 | ||||
-rw-r--r-- | public/js/mv/chart.js | 6 | ||||
-rw-r--r-- | public/js/mv/heap.js | 6 |
3 files changed, 7 insertions, 8 deletions
diff --git a/public/index.html b/public/index.html index 733f7b5..f7c67a1 100644 --- a/public/index.html +++ b/public/index.html @@ -53,8 +53,7 @@ </div> <div id="map-chart"> <h3>Map</h3> <p class="filterinfo"><span class="reset" style="display: none;">Active filter: <span class="filter"></span> <a class="reset" style="display: none;" href="javascript:mv.charts.map.filterAll();dc.redrawAll();">clear</a><span></p> - <p class="info">The larger the bubble, the more XP instances for that map.</p> - <div class="axis-label y-axis-label">Total job XP gain</div> + <div class="axis-label y-axis-label">Average str</div> <div class="axis-label x-axis-label">Total level XP gain</div> </div> </div> diff --git a/public/js/mv/chart.js b/public/js/mv/chart.js index ebb62da..9bf11f6 100644 --- a/public/js/mv/chart.js +++ b/public/js/mv/chart.js @@ -53,12 +53,12 @@ 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 ? (d.value.str / d.value.r) : 0; }) /* 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])) + .y(d3.scale.linear().domain([1, 100])) .axisPixelPadding({left:5, top: 10, right: 15, bottom: 5}) .elasticX(true) .elasticY(true) diff --git a/public/js/mv/heap.js b/public/js/mv/heap.js index 4ba5c06..0706dfa 100644 --- a/public/js/mv/heap.js +++ b/public/js/mv/heap.js @@ -5,9 +5,9 @@ var mv = function(mv) { var monoGroups = {}; var statGran = 10; 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 ea(p, d) { p.e += d.e; p.j += d.j; p.r++; p.str += d.pcstat.str; p.agi += d.pcstat.agi; return p; } + function es(p, d) { p.e -= d.e; p.j -= d.j; p.r--; p.str -= d.pcstat.str; p.agi -= d.pcstat.agi; return p; } + 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); }); |