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 }, }