Add stock dividend trend analysis page with chart rendering and data fetching

This commit is contained in:
杨水淼
2025-09-02 12:41:09 +08:00
parent 4b3a51083b
commit 521e0687a4
10 changed files with 1563 additions and 20 deletions
+1 -1
View File
@@ -92,7 +92,7 @@ function pickData(data, dateKey, valueKey,fixed=2) {
return data.map(item => ({
value: [
item[dateKey].slice(0, 4) + '-' + item[dateKey].slice(4, 6) + '-' + item[dateKey].slice(6, 8), // 格式化日期 yyyymmdd 转为 yyyy-mm-dd
item[valueKey] === null || item[valueKey] === undefined || item[valueKey] === '' ? '' : item[valueKey].toFixed(fixed)
item[valueKey] === null || item[valueKey] === undefined || item[valueKey] === '' ? '' : parseFloat(item[valueKey]).toFixed(fixed)
]
}));
}
+1
View File
@@ -102,4 +102,5 @@ function doubleLineChart(params){
if (option && typeof option === "object") {
myChart.setOption(option, true);
}
return myChart;
}