diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-08-12 18:02:28 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-08-12 18:02:28 +0900 |
| commit | 0e786fbb667450b385c46a1981b6f9b630dc0b65 (patch) | |
| tree | ace36302a4ab3bc421a1bc0e89efbcd2dea16391 /src/web | |
| parent | v2364 (diff) | |
| download | sharkey-0e786fbb667450b385c46a1981b6f9b630dc0b65.tar.gz sharkey-0e786fbb667450b385c46a1981b6f9b630dc0b65.tar.bz2 sharkey-0e786fbb667450b385c46a1981b6f9b630dc0b65.zip | |
その日ごとの「アカウントが作成された回数」もグラフにするようにした
Diffstat (limited to 'src/web')
| -rw-r--r-- | src/web/app/stats/tags/index.tag | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/web/app/stats/tags/index.tag b/src/web/app/stats/tags/index.tag index 0adf58b0bd..134fad3c0c 100644 --- a/src/web/app/stats/tags/index.tag +++ b/src/web/app/stats/tags/index.tag @@ -168,7 +168,12 @@ <mk-users-chart> <svg riot-viewBox="0 0 { viewBoxX } { viewBoxY }" preserveAspectRatio="none"> <polyline - riot-points={ points } + riot-points={ createdPoints } + fill="none" + stroke-width="1" + stroke="#1cde84"/> + <polyline + riot-points={ totalPoints } fill="none" stroke-width="1" stroke="#555"/> @@ -187,7 +192,8 @@ this.viewBoxY = 80; this.data = this.opts.data.reverse(); - const peak = Math.max.apply(null, this.data.map(d => d.count)); + const totalPeak = Math.max.apply(null, this.data.map(d => d.total)); + const createdPeak = Math.max.apply(null, this.data.map(d => d.created)); this.on('mount', () => { this.render(); @@ -195,7 +201,8 @@ this.render = () => { this.update({ - points: this.data.map((d, i) => `${i},${(1 - (d.count / peak)) * this.viewBoxY}`).join(' ') + totalPoints: this.data.map((d, i) => `${i},${(1 - (d.total / totalPeak)) * this.viewBoxY}`).join(' '), + createdPoints: this.data.map((d, i) => `${i},${(1 - (d.created / createdPeak)) * this.viewBoxY}`).join(' ') }); }; </script> |