Skip to main content

Customization overview

The library supports extensive customization through a set of APIs, each designed for specific tasks. For example, Featuresets should be used to control the visibility of chart elements, and the Widget Constructor to configure the chart size and default symbol.

For color adjustments, either Overrides or Custom themes API may be used. The image below illustrates specific areas of the chart and indicates the appropriate API to use for their customization.

Customization map

Customization APIs

caution

Note that some settings, such as the chart background color, can be adjusted with different API approaches. These approaches may override each other depending on their priority. Refer to the Customization precedence article for more information.

Commonly customized items

The visibility of the TradingView logo depends on the terms of your license agreement. Contact your TradingView account manager for more information.

Theme

The library supports dark and light themes. Use the theme parameter in Widget Constructor to specify a theme. The default value is light. The chart layout does not contain buttons that switch the theme in the UI. Therefore, users cannot switch the theme unless you develop this option outside the library.

You should switch the chart's theme when the theme of your website changes. To do this, use the changeTheme method that changes the theme on the fly.

Note that the theme value is stored in the chart's configuration. Therefore, if you restore the chart that has the dark theme, you may see a black chart background in the light theme. In this case, you should apply the theme once again using the changeTheme method.

tip

If you want to override the default colors of the light and dark themes, you can use the Custom themes API.

Limitations

  • You cannot customize icons on the toolbars.
  • The library does not support injecting custom UI components. If you want to add a UI component, implement it outside the library.