fix:修改chart Y轴为时间时的精度问题
This commit is contained in:
@@ -372,6 +372,9 @@ function asciiCompute2(num,ascii,units,dot=2,unitIndex=0){
|
||||
* unit:设置的单位
|
||||
* */
|
||||
function timeCompute(value,unit,dot=0){
|
||||
if(Number.isInteger(value)) {
|
||||
dot=0;
|
||||
}
|
||||
if(unit == 'year'){
|
||||
return `${value.toFixed(dot)} ${unit}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user