MarkValueOptions class (Graph)

MarkValueOptions()

new MarkValueOptions()

The MarkValueOptions object defines how zones are highlighted in the chart or on the axis based on specific values or value ranges. The ValueAxisOptions.mark field uses an object of type MarkValueOptions to configure these highlights. This configuration allows you to define a shape that is applied to the area of the chart corresponding to certain values on the value axis. The highlighted area, called a mark zone, is displayed only when the shape property (which defines the visual appearance of the highlight) and at least one of the start or end properties (which define the value range to highlight) are provided and contain valid values. If both start and end fields are specified, the highlight is displayed as a rectangular zone covering the range between those values. If neither start nor end is provided, a single line is displayed instead of a rectangle. If the shape property is missing or invalid, no highlight is displayed even if start and/or end values are defined.

For instance, the "start" option:

valueAxis: { mark: { shape: "blue", start: 100, end: 200 } }
highlights the chart with a blue color between the values of 100 and 200 on the value-axis.
Since:
  • 4.4

Members

(static) end :number

The end field defines the value where the mark-zone range ends. If neither the start nor end value is provided, a single line will be shown instead of a rectangle. The shape field defines the shape to apply on the chart/axis's background. The start field defines the value where the mark-zone range begins. If both start and end fields are specified, the highlight is displayed as a rectangular zone covering the range between those values. If neither start nor end is provided, a single line is displayed instead of a rectangle. If the shape property is missing or invalid, no highlight is displayed even if start and/or end values are defined.
Type:
  • number
Example
null {null}, the end field is ignored (default)
100 {number}, the mark-zone ends at value 100
end

(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.Shapes.Graph or exontrol.Shapes 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. The start field defines the value where the mark-zone range begins, and the end field defines the value where the mark-zone range ends. If both start and end fields are specified, the highlight is displayed as a rectangular zone covering the range between those values. If neither start nor end is provided, a single line is displayed instead of a rectangle. If the shape property is missing or invalid, no highlight is displayed even if start and/or end values are defined.
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)
"Button" or exontrol.Shapes.Button {object}, applies the "Button" shape on the object as defined into exontrol.Shapes namespace (@since 5.2)
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. By default, the highlight appears in the chart section only. If showIn is set to "axis", the highlight appears in the axis section only. If showIn is set to "axis,chart", the highlight appears in both sections axis and chart.
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

(static) start :number

The start field defines the value where the mark-zone range begins. If neither the start nor end value is provided, a single line will be shown instead of a rectangle. The shape field defines the shape to apply on the chart/axis's background. The end field defines the value where the mark-zone range ends. If both start and end fields are specified, the highlight is displayed as a rectangular zone covering the range between those values. If neither start nor end is provided, a single line is displayed instead of a rectangle. If the shape property is missing or invalid, no highlight is displayed even if start and/or end values are defined.
Type:
  • number
Example
null {null}, the start field is ignored (default)
100 {number}, the mark-zone starts at value 100
start