Skip to main content
Version: v25

Drawings

Drawings (shapes) are the tools that can help you analyze the charts and make clear annotations to them. The drawings toolbar is located on the left panel. Follow the Drawings List article for a complete list of tools included in the drawing toolbar.

Style Customization

Each drawing tool has its own default properties that users can change in the UI.

Style customization

However, you can customize the drawing style, e.g., change its color, size, visibility, and more in two ways:

info

You can find the full list of default properties for drawing tools in the Drawing Overrides article.

APIs

Drawing API

You can manage drawings using the Drawing API. For example, you can specify if users can select specific drawings in the UI or enable/disable displaying drawings in the Object Tree panel. For more information, follow the ILineDataSourceApi page.

Drawing Groups API

You can combine drawings into groups and manage them as a single object using the group ID. When working with groups, consider the following rules:

  1. Each drawing tool may or may not be part of a specific group. Drawings cannot be part of several groups at the same time.
  2. Only drawings of the same pane can be grouped.
  3. A group cannot be empty. Empty groups are automatically removed.
  4. All drawings in the group have sequential z-indexes. Thus, no other object can be placed between drawings in a group.
  5. Groups are bound with symbols.

Follow the IShapesGroupControllerApi page to learn more about the Drawing Groups API.

Drawing Features

Events

You can subscribe to events related to drawings such as moving a drawing or changing its properties. To do this, call the SubscribeEventsMap method with the drawing_event property.

Favorite Tools

On the chart, you can enable or disable adding drawing tools to Favorite Drawings Toolbar. This feature is enabled by default. If you disable the items_favoriting featureset, the Add to favorites button will be hidden from the UI.

Favorite tool

Templates

info

These feature is only available in Trading Terminal.

For several drawing tools of the same type, the template appliance option is available in the floating toolbar. To disable this feature, include the drawing_templates featureset in the disabled_features array.

Template

Custom Restrictions

You can hide some drawings from the toolbar or apply custom restrictions to the chart. To do this, use the drawings_access property of Widget Constructor. For example, you can choose which tools will be shown to users or hidden/disabled from them.

Disabling drawings