From acddd0439a9d87df1b6b73133ec1e1aecc07e160 Mon Sep 17 00:00:00 2001 From: goodmice Date: Mon, 11 Jul 2022 12:46:23 +0500 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=BE=20=D0=BA?= =?UTF-8?q?=D0=BE=D0=BB=D0=BB=D0=B8=D1=87=D0=B5=D1=81=D1=82=D0=B2=D0=BE=20?= =?UTF-8?q?=D1=82=D0=B8=D0=BA=D0=BE=D0=B2=20=D0=BF=D0=BE=20=D0=B4=D0=B0?= =?UTF-8?q?=D1=82=D0=B5=20=D0=BD=D0=B0=20=D0=BA=D0=B0=D0=B6=D0=B4=D1=8B?= =?UTF-8?q?=D0=B9=20=D0=B4=D0=B5=D0=BD=D1=8C=20=D0=BD=D0=B0=20TVD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/WellOperations/Tvd/index.jsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/pages/WellOperations/Tvd/index.jsx b/src/pages/WellOperations/Tvd/index.jsx index 820b2c9..ef19cae 100755 --- a/src/pages/WellOperations/Tvd/index.jsx +++ b/src/pages/WellOperations/Tvd/index.jsx @@ -1,7 +1,8 @@ -import { Link } from 'react-router-dom' -import { memo, useState, useEffect, useCallback, useMemo } from 'react' import { DoubleLeftOutlined, DoubleRightOutlined, LineChartOutlined, LinkOutlined } from '@ant-design/icons' +import { memo, useState, useEffect, useCallback, useMemo } from 'react' +import { Link } from 'react-router-dom' import { Switch, Button } from 'antd' +import { timeDay } from 'd3' import { useIdWell } from '@asb/context' import { D3Chart } from '@components/d3' @@ -16,6 +17,7 @@ import AdditionalTables from './AdditionalTables' import '@styles/index.css' import '@styles/tvd.less' + const numericRender = (d) => d && Number.isFinite(+d) ? (+d).toFixed(2) : '-' const tooltipRender = (data) => { @@ -83,8 +85,8 @@ const ticks = { date: { x: { visible: true, - count: 20, - format: (d) => formatDate(d, undefined, 'YYYY-MM-DD'), + count: timeDay.every(1), + format: (d, i) => i % 2 === 0 ? formatDate(d, undefined, 'YYYY-MM-DD') : '', }, y: { visible: true }, }