A2v10 Platform documentation
UK


Graphics Control

Represents a place to draw graphics. The drawing itself is executed programmatically using a delegate.

Inherits: UIElementBase

Properties

Name Type Description
Delegate String Name of the delegate, which will be called to draw graphics.
Argument Object Argument (usually it is Bind), which will be passed to the delegate.
CenterContent Boolean Whether to align the content.
Watch WatchMode Change tracking mode when changing the value of the argument. Possible values:
  • None - (by default) do not track.
  • Watch - call a delegate only when changing the argument.
  • Deep - call a delegate when changing the argument or when changing in any of its nested properties (recursively)
Height Length Element height. By default Auto.
Base item properties

Delegate format

draw (this:IRoot, chart:object, arg:any, node:DOMElement): void

Arguments:

  • chart - library object d3.js.
  • arg - argument described in the markup.
  • node - DOM node, associated with the item.

Note! Usually it is required to draw graphics executed once. However, in some cases, the element associated with graphics may vary.
You can set the change tracking mode using the Watch. property. Do not install Deep mode without need, because this leads to a decrease in the speed of operation.