fix: Issues #261 done.

This commit is contained in:
chiayin
2024-03-13 12:16:10 +08:00
parent 2c5eb7bcea
commit 4cea216337
3 changed files with 6 additions and 6 deletions

BIN
public/chartSpace.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 KiB

View File

@@ -351,7 +351,7 @@ export default {
setOption.scales.x.min = minX; setOption.scales.x.min = minX;
setOption.scales.x.max = maxX; setOption.scales.x.max = maxX;
setOption.scales.y.ticks.callback = function (value, index, ticks) { setOption.scales.y.ticks.callback = function (value, index, ticks) {
return getFollowTimeLabel(value, maxY, 1) return getFollowTimeLabel(value, maxY, 2)
} }
break; break;
case 'count': case 'count':
@@ -656,7 +656,7 @@ export default {
} }
}; };
setOption.scales.x.ticks.callback = function (value, index, ticks) { setOption.scales.x.ticks.callback = function (value, index, ticks) {
return getFollowTimeLabel(value, maxY, 1) return getFollowTimeLabel(value, maxY, 2)
}; };
break; break;
case 'count': case 'count':

View File

@@ -283,8 +283,8 @@ export default {
second: 'hh:mm:ss', // ex: 01:01:01 second: 'hh:mm:ss', // ex: 01:01:01
minute: 'MM/dd hh:mm', // ex: 01/01 01:01 minute: 'MM/dd hh:mm', // ex: 01/01 01:01
hour: 'MM/dd hh:00', // ex: 01/01 01:00 hour: 'MM/dd hh:00', // ex: 01/01 01:00
day: 'yyyy/MM/dd', // ex: 1911/01/01 day: 'MM/dd', // ex: 01/01
month: 'yyyy/MM/dd', // ex: 1911/01 month: 'yyyy/MM', // ex: 1911/01
}, },
round: true round: true
}, },
@@ -330,7 +330,7 @@ export default {
setOption.scales.x.min = minX; setOption.scales.x.min = minX;
setOption.scales.x.max = maxX; setOption.scales.x.max = maxX;
setOption.scales.y.ticks.callback = function (value, index, ticks) { setOption.scales.y.ticks.callback = function (value, index, ticks) {
return getFollowTimeLabel(value, maxY, 1) return getFollowTimeLabel(value, maxY, 2)
}; };
break; break;
case 'count': case 'count':
@@ -562,7 +562,7 @@ export default {
return `${content.x}: ${getSimpleTimeLabel(context.parsed.x, 2)}`; return `${content.x}: ${getSimpleTimeLabel(context.parsed.x, 2)}`;
}; };
setOption.scales.x.ticks.callback = function (value, index, ticks) { setOption.scales.x.ticks.callback = function (value, index, ticks) {
return getFollowTimeLabel(value, maxY, 1) return getFollowTimeLabel(value, maxY, 2)
}; };
break; break;
case 'count': case 'count':