Skip to main content
Version: v25

Overrides

The Overrides API allows you to customize elements on the chart like panes, scales, series, indicators, drawings, legends, and more. To override a property, 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.

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

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