fix #287 by using simple division
This commit is contained in:
@@ -146,6 +146,8 @@ import { setLineChartData } from '@/module/setChartData.js';
|
||||
import { simpleTimeLabel, followTimeLabel, dateLabel,
|
||||
setTimeStringFormatBaseOnTimeDifference,
|
||||
mapTimestampToAxisTicksByFormat,
|
||||
getStepSizeOfYTicks,
|
||||
getYTicksByIndex,
|
||||
} from '@/module/timeLabel.js';
|
||||
|
||||
const knownScaleLineChartOptions = {
|
||||
@@ -394,8 +396,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