mirror of
https://github.com/c9s/bbgo.git
synced 2024-09-20 08:11:08 +00:00
backtest report: fix default interval issue
This commit is contained in:
parent
01d1ef2255
commit
42daf48fa6
|
@ -331,8 +331,8 @@ const TradingViewChart = (props) => {
|
||||||
const chartContainerRef = useRef();
|
const chartContainerRef = useRef();
|
||||||
const chart = useRef();
|
const chart = useRef();
|
||||||
const resizeObserver = useRef();
|
const resizeObserver = useRef();
|
||||||
const [currentInterval, setCurrentInterval] = useState('5m');
|
|
||||||
const intervals = props.reportSummary.intervals || [];
|
const intervals = props.reportSummary.intervals || [];
|
||||||
|
const [currentInterval, setCurrentInterval] = useState(intervals.length > 0 ? intervals[0] : '1m');
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!chartContainerRef.current || chartContainerRef.current.children.length > 0) {
|
if (!chartContainerRef.current || chartContainerRef.current.children.length > 0) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user