refactor(admin-dashboard): unify mini chart styles and show names
This commit is contained in:
@@ -148,8 +148,10 @@
|
||||
// 用于前端渐进增强渲染迷你排行(JS 读取 data-points)
|
||||
$rankPoints = [];
|
||||
foreach ($rankRows as $r) {
|
||||
$mid = (int) ($r['merchant_id'] ?? 0);
|
||||
$rankPoints[] = [
|
||||
'merchant_id' => (int) ($r['merchant_id'] ?? 0),
|
||||
'merchant_id' => $mid,
|
||||
'name' => (string) (($merchantIdToName[$mid] ?? '') ?: ('#' . $mid)),
|
||||
'count' => (int) ($r['count'] ?? 0),
|
||||
'paid_sum' => (float) ($r['paid_sum'] ?? 0),
|
||||
];
|
||||
@@ -346,8 +348,10 @@
|
||||
// 用于前端渐进增强渲染占比条形图(JS 读取 data-points)
|
||||
$sharePoints = [];
|
||||
foreach ($shareRows as $r) {
|
||||
$pid = (int) ($r['plan_id'] ?? 0);
|
||||
$sharePoints[] = [
|
||||
'plan_id' => (int) ($r['plan_id'] ?? 0),
|
||||
'plan_id' => $pid,
|
||||
'name' => (string) (($planIdToName[$pid] ?? '') ?: ('#' . $pid)),
|
||||
'count' => (int) ($r['count'] ?? 0),
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user