Giter Site home page Giter Site logo

Comments (2)

tysonwu avatar tysonwu commented on June 14, 2024 2

Hi @sirdinkus, thanks for trying out the component!
While there is a timeRangeVisibleRange property available, it is currently read-only.

Currently you may achieve a similar effect by manually calculating out the range of candlestick you would like to show, and send the output data in a callback:

@app.callback(
    [Output('chart-id-here', 'seriesData')], # tvlwc chart
    [
        Input('date-picker', 'date'), # single date picker; this day should show in the middle of chart
        Input('no-of-days-to-the-side', 'value') # dcc.Input; an integer
    ], 
    [State('candlestick-storage', 'data')], # perhaps a dcc.Store that stores all candlestick
)
def change_range(mid, n_days, candlesticks):
    # code logic something like:
    # candles = candlesticks[mid-n_days:mid+n_days]
    return candlesticks

I will be adding the ability of setting VisibleRange for the next iteration. Thanks for your feedback.

from dash-tradingview.

wygud avatar wygud commented on June 14, 2024 1

Hi @tysonwu, thanks for the prompt reply. Creating a new chart with each callback iteration would limit my goals, which include panning beyond the initially visible data and enabling interaction between charts with different time frames through clicks or data selection.

I'll await the next update. The TV lightweight library seems to be the best open-source web-based OHLC charting option compared to the slow Plotly graphs for larger datasets. Once I have more pre-requisite programming knowledge I will try to help with some of the development if I can.

from dash-tradingview.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.