Enumeration EFlagsConst

An enum containing various bit flags to indicate properties for instances of BG.charts.Object or it's options Bits 1-16 are reserved by ChartBreaker; applications may use all aditional bits

Checking for a flag

  // manually
var isLocked = (object.get('objFlags') & BG.charts.Object.EFlags.LOCKED);
// using the utility methods
var isLocked = BG.charts.utils.hasFlag(object, BG.charts.Object.EFlags.LOCKED);

Modifying flags

Unlike most other config values, you will probably not want to directly set a new value most of the time. Instead, you might want to add, remove or toggle flags

  // adding a flag manually using |
object.set('objFlags', object.get('objFlags') | BG.charts.Object.EFlags.LOCKED);
// using the utility method
BG.charts.utils.addFlag(object, BG.charts.Object.EFlags.LOCKED);
// removing a flag manually using &~
object.set('objFlags', object.get('objFlags') & ~BG.charts.Object.EFlags.LOCKED);
// using the utility method
BG.charts.utils.rmFlag(object, BG.charts.Object.EFlags.LOCKED);
// toggling flags manually using ^
object.set('objFlags', object.get('objFlags') ^ BG.charts.Object.EFlags.LOCKED);

Enumeration Members

CONTAINER: 32

object has children (e.g. chart contains timeseries, timeseries contain layers, ...)

EXPOSED: 128

exposed to ui; e.g. if this flag is set, the UI may show this object

GENERATED: 4

object was automatically generated by a ToolGenerator, often used in combination with the LOCKED flag

LOCKED: 2

object is locked, and can/must not be modified, but can be selected/interacted with

NONE: 0

no flags

PASSTHROUGH: 8

object is ignored by event handling; e.g. can not be selected/hovered/interacted with

REMOVABLE: 16

object can be removed via UI

SIGNAL: 1

object has signal characteristics (e.g. for a horizontal line tool = threshold value of an indicator)

UNFINISHED: 64

object is not yet finialized (e.g. a tool that is currently being placed)