fix: 省份图表"未知"合入"其他"
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1060,9 +1060,10 @@ app.get('/region-chart', async (c) => {
|
||||
}
|
||||
}
|
||||
|
||||
// 分离"其他",对非"其他"排序取 Top N,剩余全部合入"其他"
|
||||
const otherCount = counts.get('其他') || 0;
|
||||
// 分离"其他"和"未知",对剩余排序取 Top N,其余全部合入"其他"
|
||||
const otherCount = (counts.get('其他') || 0) + (counts.get('未知') || 0);
|
||||
counts.delete('其他');
|
||||
counts.delete('未知');
|
||||
|
||||
const sorted = Array.from(counts.entries())
|
||||
.map(([name, value]) => ({ name, value }))
|
||||
|
||||
Reference in New Issue
Block a user