summaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-06-09 06:04:41 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-06-09 06:04:41 +0900
commit0ce9c057e132bf3cf42c5c51b90c4702d0cf7d84 (patch)
tree178fd37fcc6693f9b2ff1265b8dee47e92c8f049 /src/client
parent2.34.0 (diff)
downloadmisskey-0ce9c057e132bf3cf42c5c51b90c4702d0cf7d84.tar.gz
misskey-0ce9c057e132bf3cf42c5c51b90c4702d0cf7d84.tar.bz2
misskey-0ce9c057e132bf3cf42c5c51b90c4702d0cf7d84.zip
Fix chart rendering
Diffstat (limited to 'src/client')
-rw-r--r--src/client/app/common/views/widgets/posts-monitor.vue14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/client/app/common/views/widgets/posts-monitor.vue b/src/client/app/common/views/widgets/posts-monitor.vue
index bdf811bad0..ee1d6f91fe 100644
--- a/src/client/app/common/views/widgets/posts-monitor.vue
+++ b/src/client/app/common/views/widgets/posts-monitor.vue
@@ -121,15 +121,15 @@ export default define({
this.save();
},
draw() {
- const stats = this.props.view == 0 ? this.stats.slice(0, 50) : this.stats;
- const fediPeak = Math.max.apply(null, this.stats.map(x => x.all)) || 1;
- const localPeak = Math.max.apply(null, this.stats.map(x => x.local)) || 1;
+ const stats = this.props.view == 0 ? this.stats.slice(50, 100) : this.stats;
+ const fediPeak = Math.max.apply(null, stats.map(x => x.all)) || 1;
+ const localPeak = Math.max.apply(null, stats.map(x => x.local)) || 1;
- this.fediPolylinePoints = this.stats.map((s, i) => `${this.viewBoxX - ((this.stats.length - 1) - i)},${(1 - (s.all / fediPeak)) * this.viewBoxY}`).join(' ');
- this.localPolylinePoints = this.stats.map((s, i) => `${this.viewBoxX - ((this.stats.length - 1) - i)},${(1 - (s.local / localPeak)) * this.viewBoxY}`).join(' ');
+ this.fediPolylinePoints = stats.map((s, i) => `${this.viewBoxX - ((stats.length - 1) - i)},${(1 - (s.all / fediPeak)) * this.viewBoxY}`).join(' ');
+ this.localPolylinePoints = stats.map((s, i) => `${this.viewBoxX - ((stats.length - 1) - i)},${(1 - (s.local / localPeak)) * this.viewBoxY}`).join(' ');
- this.fediPolygonPoints = `${this.viewBoxX - (this.stats.length - 1)},${ this.viewBoxY } ${ this.fediPolylinePoints } ${ this.viewBoxX },${ this.viewBoxY }`;
- this.localPolygonPoints = `${this.viewBoxX - (this.stats.length - 1)},${ this.viewBoxY } ${ this.localPolylinePoints } ${ this.viewBoxX },${ this.viewBoxY }`;
+ this.fediPolygonPoints = `${this.viewBoxX - (stats.length - 1)},${ this.viewBoxY } ${ this.fediPolylinePoints } ${ this.viewBoxX },${ this.viewBoxY }`;
+ this.localPolygonPoints = `${this.viewBoxX - (stats.length - 1)},${ this.viewBoxY } ${ this.localPolylinePoints } ${ this.viewBoxX },${ this.viewBoxY }`;
},
onStats(stats) {
this.stats.push(stats);