MarkCategoryOptions class (Graph)

MarkCategoryOptions()

new MarkCategoryOptions()

The MarkCategoryOptions object configures the highlighting of chart/axis zones linked to specific categories.

For instance, the "applyTo" option:

categoryAxis: { categories: "x", mark: { shape: "dodgerblue", applyTo: "(index mod 2) = 0", } }
highlights every second category (even-indexed categories) by applying the shape, which sets a DodgerBlue color, to categories with indices divisible by 2.
Since:
  • 4.4
MarkCategoryOptions

Members

(static) applyTo :number|Array.<number>|string

The applyTo field specifies the category to highlight using an index, a list of indices, or an expression where "index" refers to the category's unit index, "value" represents the unit's value, and "label" corresponds to the unit's label. The expression supports predefined constants, operators and keywords as explained:
  • "index" keyword specifies the unit's index on the category axis
  • "value" keyword represents the unit's value on the category axis (before formatting)
  • "label" keyword denotes the unit's label on the category axis (after formatting)
.
Type:
  • number | Array.<number> | string
Example
null {null} or "" {string},  no unit in the category axis is highlighted
 0 {number}, highlights the chart associated with the first unit of the category axis (category with index 0)
 [0,1] {number[]}, highlights the first and second units of the category axis
 "(index mod 2) = 0" {string}, highlights every second unit in the category axis (even-indexed categories)
 "(date(value) format `MMMM` = `February`)" or "label = `February`" {string}, highlights the entire month of February
applyTo

(static) shape :any

The shape field defines the shape to apply on the chart/axis's background. The shape can be a string expression that defines shape's name within the exontrol.Shape.Graph or exontrol.Shape namespace, a CSS color, a JSON string-representation of an object of exontrol.Def.Shape type or an object of {normal,hover,click,disabled} type. The normal,hover,click and disabled are objects of exontrol.Def.Shape type.
Type:
  • any
Example
"" {string}, null {null}, no shape is applied
 "red" {string}, fills the object's background in red (CSS color)
 '{"fillColor": "red"}' or '{"normal":{"fillColor": "red"}}' {string}, fills the object's background in red (JSON-representation of an object of exontrol.Def.Shape type)
 "xxx" {string}, indicates that exontrol.Shapes.Graph.xxx or exontrol.Shapes.xxx is applied on the object's background. If the xxx field is missing, no custom shape is applied (no default object's shape is be applied)
 exontrol.Shapes.Button {object}, applies the "Button" shape on the object as defined into exontrol.Shapes namespace
shape

(static) showIn :Graph.ShowInEnum

The showIn field specifies the part of the control where the highlight appears, such as the axis, chart, or both.
Type:
Example
null {null} or exontrol.Graph.ShowInEnum.exChart {number} or 1 {number} or "chart" {string}, the highlight appears in chart section only (default)
 exontrol.Graph.ShowInEnum.exAxis {number} or 2 {number} or "axis" {string}, the highlight appears in axis section only
 "axis,chart" {string}, the highlight appears in both sections axis and chart
showIn