Add stock dividend trend analysis page with chart rendering and data fetching
This commit is contained in:
+1
-1
@@ -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)
|
||||
]
|
||||
}));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user