forked from ddrilling/asb_cloud_front
Измено колличество тиков по дате на каждый день на TVD
This commit is contained in:
parent
e22927530d
commit
acddd0439a
@ -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 { 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 { Switch, Button } from 'antd'
|
||||||
|
import { timeDay } from 'd3'
|
||||||
|
|
||||||
import { useIdWell } from '@asb/context'
|
import { useIdWell } from '@asb/context'
|
||||||
import { D3Chart } from '@components/d3'
|
import { D3Chart } from '@components/d3'
|
||||||
@ -16,6 +17,7 @@ import AdditionalTables from './AdditionalTables'
|
|||||||
import '@styles/index.css'
|
import '@styles/index.css'
|
||||||
import '@styles/tvd.less'
|
import '@styles/tvd.less'
|
||||||
|
|
||||||
|
|
||||||
const numericRender = (d) => d && Number.isFinite(+d) ? (+d).toFixed(2) : '-'
|
const numericRender = (d) => d && Number.isFinite(+d) ? (+d).toFixed(2) : '-'
|
||||||
|
|
||||||
const tooltipRender = (data) => {
|
const tooltipRender = (data) => {
|
||||||
@ -83,8 +85,8 @@ const ticks = {
|
|||||||
date: {
|
date: {
|
||||||
x: {
|
x: {
|
||||||
visible: true,
|
visible: true,
|
||||||
count: 20,
|
count: timeDay.every(1),
|
||||||
format: (d) => formatDate(d, undefined, 'YYYY-MM-DD'),
|
format: (d, i) => i % 2 === 0 ? formatDate(d, undefined, 'YYYY-MM-DD') : '',
|
||||||
},
|
},
|
||||||
y: { visible: true },
|
y: { visible: true },
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user