fix: #302. Shouldn't use mod and shouldn't double divide.

This commit is contained in:
Cindy Chang
2024-06-17 23:03:46 +08:00
parent cee61dbd93
commit 9b88de4c3f
3 changed files with 18 additions and 19 deletions

View File

@@ -158,7 +158,7 @@ import LoadingStore from '@/stores/loading.js';
import CompareStore from '@/stores/compare.js';
import SidebarStates from '@/components/Compare/SidebarStates.vue';
import { setLineChartData } from '@/module/setChartData.js';
import { simpleTimeLabel, followTimeLabel, dateLabel,
import { simpleTimeLabel, followTimeLabel, getDateLabelByMinMaxDate,
setTimeStringFormatBaseOnTimeDifference,
mapTimestampToAxisTicksByFormat,
getStepSizeOfYTicks,
@@ -438,7 +438,7 @@ export default {
const maxX = chartData.x_axis.max;
const minX = chartData.x_axis.min;
const getMoment = (time)=> this.$moment(time).format('YYYY/M/D hh:mm:ss');
const getDateLabel = dateLabel;
const getDateLabel = getDateLabelByMinMaxDate;
let datasetsPrimary = chartData.data[0].data;
let xDataPrimary;
let yDataPrimary;

View File

@@ -146,7 +146,7 @@ import PerformanceStore from '@/stores/performance.js';
import ConformanceStore from '@/stores/conformance.js';
import StatusBar from '@/components/Discover/StatusBar.vue';
import { setLineChartData } from '@/module/setChartData.js';
import { simpleTimeLabel, followTimeLabel, dateLabel,
import { simpleTimeLabel, followTimeLabel, getDateLabelByMinMaxDate,
setTimeStringFormatBaseOnTimeDifference,
mapTimestampToAxisTicksByFormat,
getStepSizeOfYTicks,
@@ -438,7 +438,7 @@ export default {
const maxX = chartData.x_axis.max;
const minX = chartData.x_axis.min;
const getMoment = (time)=> this.$moment(time).format('YYYY/M/D hh:mm:ss');
const getDateLabel = dateLabel;
const getDateLabel = getDateLabelByMinMaxDate;
let datasets = chartData.data;
let xData;
let yData;