tysonwu/dash-tradingview

unable to use fullTimeScaleOptions

Opened this issue · 2 comments

Do you have an example of showing intraday data with minutes/seconds visible?
I've played around with this for hours, but can't seem to get it. Graph shows up, but only date is visible on the x-axis and on hover.
Here's what I tried last:

        candlestick_data = [{'time': 1685129401, 'open': 175.375, 'close': 175.305, 'low': 175.28, 'high': 175.39, 'volume': 147318},
                            {'time': 1685129501, 'open': 175.375, 'close': 175.305, 'low': 175.28, 'high': 175.39, 'volume': 147318}]
        #candlestick_data = [{'time': '2021-01-01T10:00:01', 'open': 175.375, 'close': 175.305, 'low': 175.28, 'high': 175.39, 'volume': 147318}]
        tv_chart = dash_tvlwc.Tvlwc(
                seriesData=[candlestick_data],
                seriesTypes=['candlestick'],
                fullTimeScaleOptions={ 
                    'rightOffset': 100,
                    'barSpacing': 100,
                    'minBarSpacing': 5,
                    'fixLeftEdge': False,
                    'fixRightEdge': False,
                    'lockVisibleTimeRangeOnResize': False,
                    'rightBarStaysOnScroll': False,
                    'borderVisible': False,
                    'borderColor': "#fff",
                    'visible': True,
		    'timeVisible': True,
                    'secondsVisible': True,
                    'shiftVisibleRangeOnNewBar': True,
                    #'tickMarkFormatter': 'time',
	            }
            )
fouvy commented

@jisaac01
Tradingview chartOptions timeVisible, secondsVisible set to true, time using UTCTimestamp.

candlestick_data = [{'time': 1685129401, 'open': 175.375, 'close': 175.305, 'low': 175.28, 'high': 175.39, 'volume': 147318},
                    {'time': 1685129501, 'open': 175.375, 'close': 175.305, 'low': 175.28, 'high': 175.39, 'volume': 147318}]
chart_options = {
    'layout': {
        'background': {'type': 'solid', 'color': '#1B2631'},
        'textColor': 'white',
    },
    'grid': {
        'vertLines': {'visible': False},
        'horzLines': {'visible': False},
    },
    'timeScale': {'timeVisible': True, 'secondsVisible': True}
}
tv_chart = dash_tvlwc.Tvlwc(
        seriesData=[candlestick_data],
        seriesTypes=['candlestick'],
        chartOptions=chart_options
    )

barSpacing in chart_options is not working :/