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) => {
|
||||
return <TradingViewChart key={i} basePath={props.basePath} runID={props.runID} reportSummary={reportSummary}
|
||||
symbol={symbol} intervals={["1m", "5m", "1h"]}/>
|
||||
symbol={symbol}/>
|
||||
})
|
||||
}
|
||||
</div>
|
||||
|
|
|
@ -329,10 +329,8 @@ const TradingViewChart = (props) => {
|
|||
const chartContainerRef = useRef();
|
||||
const chart = useRef();
|
||||
const resizeObserver = useRef();
|
||||
const [data, setData] = useState(null);
|
||||
const [currentInterval, setCurrentInterval] = useState('5m');
|
||||
|
||||
const intervals = props.intervals || [];
|
||||
const intervals = props.reportSummary.intervals || [];
|
||||
|
||||
useEffect(() => {
|
||||
if (!chartContainerRef.current || chartContainerRef.current.children.length > 0) {
|
||||
|
|
|
@ -28,6 +28,7 @@ export interface ReportSummary {
|
|||
endTime: Date;
|
||||
sessions: string[];
|
||||
symbols: string[];
|
||||
intervals: string[];
|
||||
initialTotalBalances: BalanceMap;
|
||||
finalTotalBalances: BalanceMap;
|
||||
symbolReports: SymbolReport[];
|
||||
|
|
Loading…
Reference in New Issue
Block a user