Skip to main content

Widget Constructor

View as Markdown

The Widget Constructor is the entry point to the library. It allows you to embed the library within your web page. You can use the Widget Constructor parameters to customize the widget's appearance and behavior. All parameters are listed in the ChartingLibraryWidgetOptions interface. If you use Trading Platform, you can specify some additional parameters.

The following video tutorial describes Widget Constructor parameters and demonstrates how to use them.


The code sample below shows how to adjust some basic parameters using Widget Constructor.

Advanced Charts parameters​

The following parameters relate to Advanced Charts and Trading Platform.

Widget configuration​

Use the parameters below to configure basic widget settings:

ParameterDescription
#
#
#

Chart configuration​

Use the parameters below to configure basic chart settings:

ParameterDescription
#
#
#
#
#
#
#

Data configuration​

Use the parameters below to connect data to the chart:

ParameterDescription
#
#
#

Chart size​

Use the parameters below to customize the chart size:

ParameterDescription
#
#
#
#

UI customization​

Use the parameters below to customize colors, fonts, price and date formats, and more:

ParameterDescription
#
#
#
#
#
#
#
#
#
#
#
#
#
#

Chart features​

If you want to change the chart's behavior or show/hide UI elements, you should use featuresets. The following parameters allow you to enable/disable a certain featureset:

ParameterDescription
#
#

Indicators and drawings​

Use the parameters below to customize indicators (studies) and drawings:

ParameterDescription
#
#
#
#
#

Symbol search and comparison​

Use the parameters below to customize the Symbol Search:

ParameterDescription
#
#
#

Saving and loading chart​

The following properties are used for saving and loading charts. For a detailed guide on which save/load approach to choose, see Saving and loading charts.

High-level APIs​

Specify the following parameters to save/load a chart using the high-level APIs (REST API or API handlers).

ParameterDescriptionAPI type
#
#
#
#
#
#

Low-level API​

Specify the following parameters to save/load a chart using the low-level API:

ParameterDescription
#
#
#

User settings​

User settings are stored independently of chart layouts to ensure that users have control over their specific preferences. Use settings_adapter to save user settings.

Trading Platform parameters​

All Trading Platform parameters are listed in the TradingTerminalWidgetOptions interface. Most of them duplicate the Advanced Charts parameters. Additional parameters are listed below:

ParameterDescription
#
#
#
#
#
#
#
#
#