Skip to main content
Version: latest

Overrides

The Overrides API allows you to customize elements on the chart like panes, scales, series, drawings, indicators, legends, and more.

Chart and drawings

To override a property that relates to the chart or drawing, you should specify this property in the overrides parameter of Widget Constructor. The code sample below changes the chart background color and chart style using paneProperties.background and mainSeriesProperties.style.

var widget = window.tvWidget = new TradingView.widget({
// ...
overrides: {
"paneProperties.background": "#020024",
"mainSeriesProperties.style": 2,
}
});

If you want to change a property's value on the fly, you can use the applyOverrides method.

widget.applyOverrides({ "mainSeriesProperties.visible": false });

For more information on how to customize different entities using overrides, refer to the corresponding topics:

Indicators

You can also customize indicators using overrides. Refer to the Indicator Overrides article for more information.