修改交易统计图

This commit is contained in:
liuwu 2024-03-04 17:29:42 +08:00
parent 5c37fc10dc
commit 4169a7e4ab
2 changed files with 3 additions and 3 deletions

View File

@ -170,7 +170,7 @@ public class BigScreenController extends BaseController {
array.forEach(a -> { array.forEach(a -> {
Map<String, Object> m = (Map<String, Object>) a; Map<String, Object> m = (Map<String, Object>) a;
tradeMap.put(m.get("label").toString(), m.get("label").toString()); tradeMap.put(m.get("label").toString(), m.get("label").toString());
if (month1.contains(month)){ if (month1.contains(year)){
yearCount.addAndGet(Integer.parseInt(m.get("count").toString())); yearCount.addAndGet(Integer.parseInt(m.get("count").toString()));
yearMoney.updateAndGet(v -> v + Double.parseDouble(m.get("trade").toString())); yearMoney.updateAndGet(v -> v + Double.parseDouble(m.get("trade").toString()));
} }

View File

@ -797,11 +797,11 @@
} }
var json1 = data.yearTrade; var json1 = data.yearTrade;
for (let key in json1) { for (let key in json1) {
source.push([key, json1[key], Number(json1[key]).toFixed(4), 'all']) source.push([key,Number(json1[key]).toFixed(4), Number(json1[key]).toFixed(4), 'year'])
} }
var json2 = data.monTrade; var json2 = data.monTrade;
for (let key in json2) { for (let key in json2) {
source.push([key, json2[key], Number(json2[key]).toFixed(4), 'all']) source.push([key, Number(json2[key]).toFixed(4), Number(json2[key]).toFixed(4), 'mon'])
} }
let option = { let option = {
title:[ title:[