mirror of
https://github.com/linux-do/new-api.git
synced 2025-09-18 16:36:37 +08:00
feat: 完善数据看板 #190
This commit is contained in:
parent
1162683b4d
commit
c6e85d5b57
@ -72,6 +72,7 @@ const Detail = (props) => {
|
||||
stack: true,
|
||||
legends: {
|
||||
visible: true,
|
||||
selectMode: 'single',
|
||||
},
|
||||
title: {
|
||||
visible: true,
|
||||
@ -216,6 +217,8 @@ const Detail = (props) => {
|
||||
} else if (dataExportDefaultTime === 'week') {
|
||||
timeGranularity = 604800;
|
||||
}
|
||||
// sort created_at
|
||||
data.sort((a, b) => a.created_at - b.created_at);
|
||||
data.forEach((item) => {
|
||||
item['created_at'] =
|
||||
Math.floor(item['created_at'] / timeGranularity) * timeGranularity;
|
||||
|
Loading…
Reference in New Issue
Block a user