dash-tradingview icon indicating copy to clipboard operation
dash-tradingview copied to clipboard

unable to use fullTimeScaleOptions

Open jisaac01 opened this issue 2 years ago • 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',
	            }
            )

jisaac01 avatar May 31 '23 21:05 jisaac01

@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
    )

fouvy avatar Jul 15 '23 14:07 fouvy

barSpacing in chart_options is not working :/

algorithmy1 avatar Mar 23 '24 13:03 algorithmy1