[Client] Fix some charts
This commit is contained in:
parent
c26ed1421b
commit
e88f7ca7b2
3 changed files with 101 additions and 36 deletions
|
|
@ -43,11 +43,17 @@ export default Vue.extend({
|
|||
};
|
||||
},
|
||||
mounted() {
|
||||
(this as any).api('aggregation/users/activity', {
|
||||
(this as any).api('charts/user/notes', {
|
||||
userId: this.user.id,
|
||||
limit: 20 * 7
|
||||
span: 'day',
|
||||
limit: 7 * 20
|
||||
}).then(activity => {
|
||||
this.activity = activity;
|
||||
this.activity = activity.diffs.normal.map((_, i) => ({
|
||||
total: activity.diffs.normal[i] + activity.diffs.reply[i] + activity.diffs.renote[i],
|
||||
notes: activity.diffs.normal[i],
|
||||
replies: activity.diffs.reply[i],
|
||||
renotes: activity.diffs.renote[i]
|
||||
}));
|
||||
this.fetching = false;
|
||||
});
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue