rafaelklaessen / react-tradingview-widget

React component for rendering the TradingView Advanced Real-Time Chart Widget.
MIT License
273 stars 94 forks source link

paneProperties.background not working #73

Open khanhnoi opened 2 years ago

khanhnoi commented 2 years ago

I want to change background of chart. But overrides not working ?

Solution i find

new TradingView.widget({
    overrides: {
        'paneProperties.background': '#2C2F33',
    }
});

NextJs :

  <TradingViewWidget
                      autosize={true}
                      symbol={symbol}
                      interval={"D"}
                      timezone={"Etc/UTC"}
                      style={1}
                      locale={"en"}
                      toolbar_bg={"#2C2F33" || "transparent" || "#f1f3f6"}
                      enable_publishing={false}
                      hide_top_toolbar={true}
                      hide_legend={true}
                      save_image={false}
                      container_id={"tradingview_11786"}
                      theme={"dark" || "light"}
                      overrides={{
                        "paneProperties.background": "#2C2F33",
                        "paneProperties.backgroundType": "solid",
                        // background: "#2C2F33",
                        // backgroundColor: "#2C2F33",
                        // theme: "#2C2F33",
                        // volumePaneSize: "medium",
                      }}
                />
    Please help me.