[Python] Black screen when launching Lightweight Charts on Windows 11

Discussão em 'Python' iniciado por Stack, Setembro 29, 2024.

  1. Stack

    Stack Membro Participativo

    I have been trying to solve this problem for a long time, but so far without success. I haven't found a solution anywhere.

    import pandas as pd
    from lightweight_charts import Chart

    if __name__ == '__main__':

    chart = Chart()
    df = pd.read_csv('ohlcv.csv')
    chart.set(df)
    chart.show(block=True)



    # ohlcv.csv file

    /*

    ,date,open,high,low,close,volume
    0,2010-06-29,1.2667,1.6667,1.1693,1.5927,277519500.0
    1,2010-06-30,1.6713,2.028,1.5533,1.5887,253039500.0
    2,2010-07-01,1.6627,1.728,1.3513,1.464,121461000.0
    3,2010-07-02,1.47,1.55,1.2473,1.28,75871500.0
    4,2010-07-06,1.2867,1.3333,1.0553,1.074,101664000.0
    5,2010-07-07,1.0933,1.1087,0.9987,1.0533,102645000.0
    6,2010-07-08,1.0567,1.1793,1.038,1.164,114526500.0
    7,2010-07-09,1.18,1.1933,1.1033,1.16,60061500.0
    8,2010-07-12,1.1533,1.2047,1.1233,1.1413,32487000.0
    */

    Continue reading...

Compartilhe esta Página