add lint js
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import * as d3 from "d3"
|
||||
import React, {FC, LegacyRef, useEffect, useRef} from "react"
|
||||
import {rainfall, rainfallGraphData} from "../../types";
|
||||
import React, {FC, useEffect, useRef} from "react"
|
||||
import {rainfallGraphData} from "../../types"
|
||||
|
||||
const RainfallGraph: FC<RainfallGraphProps> = ({width, height, data, start_date, end_date}) => {
|
||||
|
||||
@@ -50,7 +50,7 @@ const RainfallGraph: FC<RainfallGraphProps> = ({width, height, data, start_date,
|
||||
.call(d3.axisBottom(x)
|
||||
.ticks(8)
|
||||
.tickFormat(
|
||||
// @ts-ignore
|
||||
// @ts-expect-error change time format
|
||||
d3.timeFormat("%d/%m/%Y")
|
||||
)
|
||||
, 0)
|
||||
@@ -101,7 +101,7 @@ const RainfallGraph: FC<RainfallGraphProps> = ({width, height, data, start_date,
|
||||
|
||||
return <div className="relative">
|
||||
<svg ref={svgRef} />
|
||||
<div id="tooltip" className="absolute px-2 py-2 top-3 left-10 rounded border" style={{opacity: 0}}></div>
|
||||
<div id="tooltip" className="absolute left-10 top-3 rounded border p-2" style={{opacity: 0}}></div>
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user