fix #287 by using simple division
This commit is contained in:
@@ -158,6 +158,8 @@ import { setLineChartData } from '@/module/setChartData.js';
|
||||
import { simpleTimeLabel, followTimeLabel, dateLabel,
|
||||
setTimeStringFormatBaseOnTimeDifference,
|
||||
mapTimestampToAxisTicksByFormat,
|
||||
getStepSizeOfYTicks,
|
||||
getYTicksByIndex,
|
||||
} from '@/module/timeLabel.js';
|
||||
import i18next from '@/i18n/i18n';
|
||||
|
||||
@@ -549,8 +551,9 @@ export default {
|
||||
};
|
||||
primeVueSetOption.scales.x.min = minX;
|
||||
primeVueSetOption.scales.x.max = maxX;
|
||||
const {resultStepSize: YTickStepSize, unitToUse} = getStepSizeOfYTicks(maxY); // Stepsize only needs to be calculated once
|
||||
primeVueSetOption.scales.y.ticks.callback = function (value, index, ticks) {
|
||||
return getFollowTimeLabel(value, maxY, 1)
|
||||
return getYTicksByIndex(YTickStepSize, index, unitToUse);
|
||||
}
|
||||
break;
|
||||
case 'count':
|
||||
|
||||
Reference in New Issue
Block a user