ui: fix ratingHistory

This commit is contained in:
undefined committed 2021-05-16 13:09:53 +08:00
1 parent e0b5700cfc
commit 93ff1957d8
2 files changed
+3 -3

No files matched your search

@@ -21,7 +21,7 @@ const page = new NamedPage('user_detail', async () => {
});
});
const data = await request.get('');
const history = data.udoc?.history || [];
const history = data.udoc?.ratingHistory || [];
while (history.length > 30) history.shift();
while (history.length < 30) history.unshift(1500);
const $dom = document.getElementById('rating-placeholder');
@@ -38,7 +38,7 @@ const page = new NamedPage('user_detail', async () => {
bottom: '10%',
},
xAxis: { data: history.map((x, i) => moment().add(-30 + i, 'days').fromNow()) },
yAxis: {},
yAxis: { type: 'category' },
toolbox: {
right: 10,
feature: {