mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-21 22:43:52 +00:00
fix trading view chart intervals
This commit is contained in:
parent
590748b71d
commit
ec2f0cd0b1
|
@ -235,7 +235,7 @@ const ReportDetails = (props: ReportDetailsProps) => {
|
||||||
{
|
{
|
||||||
reportSummary.symbols.map((symbol: string, i: number) => {
|
reportSummary.symbols.map((symbol: string, i: number) => {
|
||||||
return <TradingViewChart key={i} basePath={props.basePath} runID={props.runID} reportSummary={reportSummary}
|
return <TradingViewChart key={i} basePath={props.basePath} runID={props.runID} reportSummary={reportSummary}
|
||||||
symbol={symbol} intervals={["1m", "5m", "1h"]}/>
|
symbol={symbol}/>
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -329,10 +329,8 @@ const TradingViewChart = (props) => {
|
||||||
const chartContainerRef = useRef();
|
const chartContainerRef = useRef();
|
||||||
const chart = useRef();
|
const chart = useRef();
|
||||||
const resizeObserver = useRef();
|
const resizeObserver = useRef();
|
||||||
const [data, setData] = useState(null);
|
|
||||||
const [currentInterval, setCurrentInterval] = useState('5m');
|
const [currentInterval, setCurrentInterval] = useState('5m');
|
||||||
|
const intervals = props.reportSummary.intervals || [];
|
||||||
const intervals = props.intervals || [];
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!chartContainerRef.current || chartContainerRef.current.children.length > 0) {
|
if (!chartContainerRef.current || chartContainerRef.current.children.length > 0) {
|
||||||
|
|
|
@ -28,6 +28,7 @@ export interface ReportSummary {
|
||||||
endTime: Date;
|
endTime: Date;
|
||||||
sessions: string[];
|
sessions: string[];
|
||||||
symbols: string[];
|
symbols: string[];
|
||||||
|
intervals: string[];
|
||||||
initialTotalBalances: BalanceMap;
|
initialTotalBalances: BalanceMap;
|
||||||
finalTotalBalances: BalanceMap;
|
finalTotalBalances: BalanceMap;
|
||||||
symbolReports: SymbolReport[];
|
symbolReports: SymbolReport[];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user