diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-10-23 09:59:43 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-10-23 09:59:43 +0900 |
| commit | 11c5d257f2394a8a9dcfc7fe15c9e57684dfd11e (patch) | |
| tree | bb01289dceb1472924910a9593a36ae36b5059ed /src/client | |
| parent | :art: (diff) | |
| download | misskey-11c5d257f2394a8a9dcfc7fe15c9e57684dfd11e.tar.gz misskey-11c5d257f2394a8a9dcfc7fe15c9e57684dfd11e.tar.bz2 misskey-11c5d257f2394a8a9dcfc7fe15c9e57684dfd11e.zip | |
ハッシュタグチャートでローカルとリモートを分離するように
Diffstat (limited to 'src/client')
| -rw-r--r-- | src/client/app/desktop/views/pages/deck/deck.hashtag-column.vue | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/client/app/desktop/views/pages/deck/deck.hashtag-column.vue b/src/client/app/desktop/views/pages/deck/deck.hashtag-column.vue index 6006146164..2b5bf14b27 100644 --- a/src/client/app/desktop/views/pages/deck/deck.hashtag-column.vue +++ b/src/client/app/desktop/views/pages/deck/deck.hashtag-column.vue @@ -16,7 +16,6 @@ import Vue from 'vue'; import XColumn from './deck.column.vue'; import XHashtagTl from './deck.hashtag-tl.vue'; import * as ApexCharts from 'apexcharts'; -import * as tinycolor from 'tinycolor2'; export default Vue.extend({ components: { @@ -45,7 +44,8 @@ export default Vue.extend({ span: 'hour', limit: 24 }).then(stats => { - const data = []; + const local = []; + const remote = []; const now = new Date(); const y = now.getFullYear(); @@ -55,11 +55,10 @@ export default Vue.extend({ for (let i = 0; i < 24; i++) { const x = new Date(y, m, d, h - i); - data.push([x, stats.count[i]]); + local.push([x, stats.local.count[i]]); + remote.push([x, stats.remote.count[i]]); } - const color = tinycolor(getComputedStyle(document.documentElement).getPropertyValue('--primary')); - const chart = new ApexCharts(this.$refs.chart, { chart: { type: 'area', @@ -82,13 +81,15 @@ export default Vue.extend({ width: 2 }, series: [{ - name: 'count', - data: data + name: 'Local', + data: local + }, { + name: 'Remote', + data: remote }], xaxis: { type: 'datetime', - }, - colors: [`#${color.clone().toHex()}`] + } }); chart.render(); |