Customization overview
The library includes multiple APIs to customize the UI. Refer to the following pages for more information on how to customize certain elements:
- Overrides — allow you to customize elements on the chart like panes, scales, series, studies, drawings, and more.
- CSS Styles — allow you to customize UI elements outside the chart like toolbars, dialogs, and widgets.
- Featuresets — allow you to show/hide UI elements and change the ways of interacting with the chart. For example, you can enable the support of resolutions in ticks or disable chart scrolling.
- Widget Constructor — allows you to customize the chart size, list featuresets and overrides, set up a theme, and more.
UI elements
Refer to the UI Elements section for more details on drawings, indicators, marks, and other elements.
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.
Language
The library supports a variety of languages. For more information, refer to the Localization article.
TradingView logo
The visibility of the TradingView logo depends on the terms of your license agreement. Contact your TradingView account manager for more information.
Price formatting
Refer to the Price Format paragraph for information on how to customize the price format.
Non-customizable components
The library doesn't support customization for the following components:
Icons on the toolbars
The color of some UI elements, for example, the TradingView trademark blue that appears in some dialogs
Custom components
Note that you cannot inject custom UI components into the library. If you want to add a UI component, you should implement it outside the library.