mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-21 23:53:52 +00:00
Use datetime helpers instead of direct date-fns import
This commit is contained in:
parent
dbccd30ec6
commit
4a067daba5
|
@ -16,7 +16,6 @@ import {
|
|||
PlotConfig,
|
||||
Trade,
|
||||
} from '@/types';
|
||||
import { format } from 'date-fns-tz';
|
||||
|
||||
import ECharts from 'vue-echarts';
|
||||
|
||||
|
@ -44,6 +43,7 @@ import {
|
|||
} from 'echarts/components';
|
||||
import { use } from 'echarts/core';
|
||||
import { CanvasRenderer } from 'echarts/renderers';
|
||||
import { timestampms } from '@/shared/formatters';
|
||||
|
||||
use([
|
||||
AxisPointerComponent,
|
||||
|
@ -645,15 +645,11 @@ function initializeChartOptions() {
|
|||
function updateSliderPosition() {
|
||||
if (!props.sliderPosition) return;
|
||||
|
||||
const start = format(
|
||||
props.sliderPosition.startValue - props.dataset.timeframe_ms * 40,
|
||||
'yyyy-MM-dd HH:mm:ss',
|
||||
);
|
||||
const end = format(
|
||||
const start = timestampms(props.sliderPosition.startValue - props.dataset.timeframe_ms * 40);
|
||||
const end = timestampms(
|
||||
props.sliderPosition.endValue
|
||||
? props.sliderPosition.endValue + props.dataset.timeframe_ms * 40
|
||||
: props.sliderPosition.startValue + props.dataset.timeframe_ms * 80,
|
||||
'yyyy-MM-dd HH:mm:ss',
|
||||
);
|
||||
if (candleChart.value) {
|
||||
candleChart.value.dispatchAction({
|
||||
|
|
Loading…
Reference in New Issue
Block a user