new CategoryAxisOptions()
For instance, the "categories" option:
categoryAxis: { categories: "2001,2002,2003" }defines the categories on oX axis
Members
(static) align :exontrol.AlignEnum
The default category-axis can be shown next to 0-origin of value-axis only if:
- misc.updateRangeOnScroll {number} option is 0 (specifies the time in ms to update the chart's minimum and maximum values while user scrolls the chart (0 indicates that the chart's minimum and maximum values are updated only when changing the data))
- align option is 1(exAlignCenter) or 4(exAlignVCenter)
- 0 is shown between value-axis minimum and maximum values
Type:
- exontrol.AlignEnum
Example
null {null}, aligns the category-axis to bottom/right side of the view (default)
exontrol.AlignEnum.exAlignTop {exontrol.AlignEnum} or 0 {number}, aligns the category-axis to top/left side of the view
"center" {string}, the category-axis is displayed next to 0-origin of value-axis (only if above conditions are met)
align
(static) angle :string|object
Type:
- string | object
Example
null {null}, all angles are set on auto (by default). For instance, if the axis is vertically displayed and aligned to the left side of the control, the title is rotated 90 degree anti-clockwise, while the labels are shown not-rotated. if the axis is aligned to the right the title is rotated 90 degree clockwise.
"45,0" {string}, the title is rotated 45 degree clockwise, while the labels are not rotated
{title: -90} {string}, the title is rotated 90 degree anti-clockwise
angle
(static) axisLine :LineOptions
Type:
Example
null {null}, indicates a solid-black 1-pixel wide axis-line
{color: "red", width: 2} {LineOptions}, indicates a solid-red 2-pixels wide axis-line
axisLine
(static) categories :string|Array.<string>
- categories {number}, the categories property could indicate:
- a number (if the control's Data property is not set) that defines a single category-name
- the column index from the control's Data (if the control's Data property is set), that provides the category names
- categories {string}, the categories property could indicate:
- names separated by comma (if the control's Data property is not set) that defines the category names
- the column name or index from the control's Data (if the control's Data property is set), that provides the category names
- categories {string[]}, array of category names
Type:
- string | Array.<string>
Example
"x" {string}, specifies single-category named "x" (if the control's Data property is not set), or the column named "x" within the control's Data property provides the category names (if the control's Data property is set)
"2001,<b>2002,2003" {string}, indicates three categories such as "2001", "2002" and "2003", while 2002 is displayed in bold
[2001,2002] {array}, specifies two categories such as "2001" and "2002"
categories
(static) chartGridLines :FormatGridLinesOptions
chartGridLines: {format: "'' + index", color: "lightgray"}
majorGridLines: {color: "lightgray"}
In the above example, the chartGridLines option is configured to display additional grid lines with a light gray color and transarent labels. The majorGridLines option is also set to light gray, which means that the major grid lines will have the same appearance as the additional grid lines defined by chartGridLines.
Type:
Example
null {null}, no grid lines are displayed
{format: "date(value) format `MMM`", color: "red", width: 2, step: 2} {FormatGridLinesOptions}, indicates a solid-red 2-pixels wide grid lines, every second month
{format: "((0:=date(value)) format `MMM`) + (month(=:0) = 1 ? `<br>` + (=:0 format `YYYY`) : ``)"} {FormatGridLinesOptions}, the grid-lines are shown for every month, and the label includes the year for every January
chartGridLines
(static) cursorFormat :string
The format-expression supports predefined constants, operators and keywords as explained:
- "index" keyword defines the index of the category
- "value" keyword defines the name of the category
The name of the category can include ex-HTML tags. The tooltip is displayed as it is, if the cursorFormat field is null (undefined).
Type:
- string
Example
"``" {string}, no tooltip is shown on category-axis, when the crosshair intersects the category-axis
"date(value) format `MMM d, yyyy`" {string}, the tooltip displays the dates in "MMM d, yyy" format
cursorFormat
(static) format :string
The format-expression supports predefined constants, operators and keywords as explained:
- "index" keyword defines the index of the category
- "value" keyword defines the name of the category
The name of the category is displayed as it is, if the format field is null (undefined). The name of the category can include ex-HTML tags. The "split" field specifies whether the categories are redefined based on the "format" option.
Type:
- string
Example
null {null}, the names of the categories are displayed as they are (format is ignored)
"``" {string}, no label is displayed on the category-axis
"date(value) format `MMM d, yyyy`" {string}, the category-axis displays the dates in "MMM d, yyy" format
format
(static) majorGridLines :GridLinesOptions
Type:
Example
null {null}, no grid lines are displayed
{color: "red", width: 2, step: 2} {GridLinesOptions}, indicates a solid-red 2-pixels wide grid lines, displayed two by two
majorGridLines
(static) majorTicks :TicksOptions
Type:
Example
null {null}, indicates a solid-black 1-pixel wide tick
{color: "red", width: 2} {LineOptions}, indicates a solid-red 2-pixels wide tick
majorTicks
(static) mark :MarkCategoryOptions|Array.<MarkCategoryOptions>
Type:
- MarkCategoryOptions | Array.<MarkCategoryOptions>
- Since:
- 4.4
Example
null {null}, no categories are highlighted
{shape: "red", applyTo: 10} {MarkCategoryOptions}, highlighs in red, the cateory with the index 10
[{shape: "red", applyTo: 10}, {shape: "green", applyTo: 12}] {MarkCategoryOptions[]}, highlighs in red, the cateory with the index 10 and highlighs in green, the cateory with the index 12
{shape: {fillColor: "dodgerBlue",frameColor: "blue"}, applyTo: "value=`January`"} {MarkCategoryOptions}, highlights the category labeled "January" with a dodgerBlue fill and a blue frame
mark
(static) offsetLabel :number|string|Array.<number>|Array.<string>
Type:
- number | string | Array.<number> | Array.<string>
Example
null {null}, the labels are shown in their original-positions
8 {number}, the labels are shown shifted to the right, relative to their original-positions
",-8" {number}, the labels are shown shifted to the top, relative to their original-positions
[2,4] {number}, the labels are shown with a shift of 2 pixels to the right and 4 pixels down compared to their original positions
offsetLabel
(static) overviewGridLines :FormatGridLinesOptions
Type:
Example
null {null}, no grid lines are displayed
{format: "date(value) format `MMM`", color: "red", width: 2, step: 2} {FormatGridLinesOptions}, indicates a solid-red 2-pixels wide grid lines, every second month
{format: "year(date(value))"} {FormatGridLinesOptions}, a black 1-pixel wide grid-line is shown for every year
overviewGridLines
(static) reverse :boolean
- Sort, sorts the series values in ascending or descending order
- reverse (option of CategoryAxisOptions type), reverses the position of the values as they were added (if no Sort is applied), or reverses the order produced by the Sort property (if Sort is applied)
- Order, repositions values according to their zero-based indexes in a custom sequence
Type:
- boolean
Example
null {null}, by default categories are listed from left to right (chart horizontally oriented, values go vertically, categories go horizontally) and from bottom to top (chart vertically oriented, values go horizontally, categories go vertically)
true {boolean}, the category axis direction will be reversed, it shows categories from right to left (chart horizontally oriented, values go vertically, categories go horizontally), and top to bottom (chart vertically oriented, values go horizontally, categories go vertically)
reverse
(static) shape :any
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) split :boolean
Type:
- boolean
Example
null {null} or false {boolean}, the categories remain unsplit by default
true {boolean}, splits the category-axis in groups
split
(static) tfi :string|object
The tfi field as string supports any of the following keywords (each keyword can be specified using first letters only such as "b" for "bold) separated by space characters:
- bold, displays the text in bold (equivalent of <b> tag)
- italic, displays the text in italics (equivalent of <i> tag)
- underline, underlines the text (equivalent of <u> tag)
- strikeout, specifies whether the text is strike-through (equivalent of <s> tag)
- <fontName name>, specifies the font's family (equivalent of <font name> tag)
- <fontSize size>, specifies the size of the font (equivalent of <font ;size> tag)
- <fgColor CSSColor>, specifies the text's foreground color (equivalent of <fgcolor> tag)
- <bgColor CSSColor>, specifies the text's background color (equivalent of <bgcolor> tag)
- <shaColor CSSColor;width;offset>, defines the text's shadow (equivalent of <sha color;width;offset> tag)
- <outColor CSSColor>, shows the text with outlined characters (CSScolor) (equivalent of <out color> tag)
- <graColor CSSColor;mode;blend>, defines a gradient text (equivalent of <gra color;mode;blend> tag)
Any other word within the tfi field that's not recognized as a keyword is interpreted as:
- name of the font (not a number), specifies the font's family (equivalent of <font name> tag)
- size of the font (number), specifies the size of the font (equivalent of <font ;size> tag)
The tfi field as object supports any of the following fields:
- bold {boolean}, displays the text in bold (equivalent of <b> tag)
- italic {boolean}, displays the text in italics (equivalent of <i> tag)
- underline {boolean}, underlines the text (equivalent of <u> tag)
- strikeout {boolean}, specifies whether the text is strike-through (equivalent of <s> tag)
- fontName {string}, specifies the font's family (equivalent of <font name> tag)
- fontSize {number}, specifies the size of the font (equivalent of <font ;size> tag)
- fgColor {string}, specifies the text's foreground color (CSScolor) (equivalent of <fgcolor> tag)
- bgColor {string}, specifies the text's background color (CSScolor) (equivalent of <bgcolor> tag)
- shaColor {object}, specifies an object of {color, width, offset} type that defines the text's shadow (equivalent of <sha color;width;offset> tag), where:
- outColor {string}, shows the text with outlined characters (CSScolor) (equivalent of <out color> tag)
- graColor {object}, specifies an object of {color, mode, blend} type that defines a gradient text (equivalent of <gra color;mode;blend> tag), where:
- color {string}, defines the gradient-color (CSScolor)
- mode {number}, defines the gradient direction as 0 (left-right), 1 (default, top-bottom), 2 (left-center-right), and 3 (top-center-bottom)
- blend {number}, defines the gradient blend as a value between 0 and 1
CSSColor or CSS legal color values can be specified by the following methods:
- Hexadecimal colors, is specified with: #RRGGBB, where the RR (red), GG (green) and BB (blue) hexadecimal integers specify the components of the color. All values must be between 00 and FF. For example, #0000ff value is rendered as blue, because the blue component is set to its highest value (ff) and the others are set to 00.
- Hexadecimal colors with transparency, is specified with: #RRGGBBAA, where AA (alpha) value must be between 00 and FF. For example, #0000ff80 defines a semi-transparent blue.
- RGB colors, is specified with the RGB(red, green, blue) function. Each parameter (red, green, and blue) defines the intensity of the color and can be an integer between 0 and 255. For example, rgb(0,0,255) defines the blue color.
- RGBA colors, are an extension of RGB color values with an alpha channel as RGBA(red, green, blue, alpha) function, where the alpha parameter is a number between 0.0 (fully transparent) and 1.0 (fully opaque). For example, rgba(0,0,255,0.5) defines a semi-transparent blue.
- HSL colors, is specified with the HSL(hue, saturation, lightness) function, where hue is a degree on the color wheel (from 0 to 360) - 0 (or 360) is red, 120 is green, 240 is blue. saturation is a percentage value; 0% means a shade of gray and 100% is the full color. lightness is also a percentage; 0% is black, 100% is white. HSL stands for hue, saturation, and lightness - and represents a cylindrical-coordinate representation of colors. For example, hsl(240, 100%, 50%) defines the blue color.
- HSLA colors, are an extension of HSL color values with an alpha channel - which specifies the opacity of the object as HSLA(hue, saturation, lightness, alpha) function, where alpha parameter is a number between 0.0 (fully transparent) and 1.0 (fully opaque). For example, hsla(240, 100%, 50%,0.5) defines a semi-transparent blue.
- Predefined/Cross-browser color names, 140 color names are predefined in the HTML and CSS color specification. For example, blue defines the blue color.
Type:
- string | object
Example
null {null}, the tfi field is ignored
"bold monospace 16 <fg blue>" {string}, defines Monospace font of 16px height, bold and blue
{bold: true, fontName: "monospace", fontSize: 16, fgColor: "blue"} {object}, defines Monospace font of 16px height, bold and blue
tfi
(static) title :string
Type:
- string
Example
null {null}, no title is shown
"lt;fgcolor blue>Years" {string}, the Years title is displayed in blue
title
(static) visible :boolean
Type:
- boolean
Example
null {null}, by default, the category-axis is visible (if null the visible field has no effect)
false {boolean}, hides the category-axis
visible