Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • _CategoryAxis
    • CategoryAxis

Index

Constructors

constructor

  • Returns CategoryAxis

Properties

autoGridCount

autoGridCount: boolean

Specifies whether number of gridCount is specified automatically, acoarding to the axis size.

default

true

axisAlpha

axisAlpha: number

Axis opacity. Value range is 0 - 1.

default

1

axisColor

axisColor: string

Axis color. #000000

axisThickness

axisThickness: number

Thickness of the axis.

default

1

boldPeriodBeginning

boldPeriodBeginning: boolean

When parse dates is on for the category axis, the chart will try to highlight the beginning of the periods, like month, in bold. Set this to false to disable the functionality.

default

true

color

color: string

Color of axis value labels. Will use chart's color if not set.

dashLength

dashLength: number

Length of a dash. 0 means line is not dashed.

dateFormats

dateFormats: any[]

Date formats of different periods. Possible period values: fff - milliseconds, ss - seconds, mm - minutes, hh - hours, DD - days, MM - months, WW - weeks, YYYY - years. Check this page for date formatting strings. [ {period:'fff',format:'JJ:NN:SS'}, {period:'ss',format:'JJ:NN:SS'}, {period:'mm',format:'JJ:NN'}, {period:'hh',format:'JJ:NN'}, {period:'DD',format:'MMM DD'}, {period:'WW',format:'MMM DD'}, {period:'MM',format:'MMM'}, {period:'YYYY',format:'YYYY'} ]

equalSpacing

equalSpacing: boolean

In case your category axis values are Date objects and parseDates is set to true, the chart will parse dates and will place your data points at irregular intervals. However if you want dates to be parsed (displayed on the axis, baloons, etc), but data points to be placed at equal intervals (omiting dates with no data), set equalSpacing to true.

fillAlpha

fillAlpha: number

Fill opacity. Every second space between grid lines can be filled with color. Set fillAlpha to a value greater than 0 to see the fills.

fillColor

fillColor: string

Fill color. Every second space between grid lines can be filled with color. Set fillAlpha to a value greater than 0 to see the fills.

default

"#FFFFFF"

fontSize

fontSize: string

Size of value labels text. Will use chart's fontSize if not set.

forceShowField

forceShowField: string

Field in data provider which specifies if the category value should always be shown. For example: categoryAxis.forceShowField = "forceShow"; Field in data provider which specifies if the category value should always be shown. For example: categoryAxis.forceShowField = "forceShow"; And in data: {category:"one", forceShow:true, value:100} Note, this works only when parseDates is set to false.

gridAlpha

gridAlpha: number

Opacity of grid lines. 0.2

gridColor

gridColor: string

Color of grid lines. #000000

gridCount

gridCount: number

Number of grid lines. In case this is value axis, or your categoryAxis parses dates, the number is approximate. The default value is 5. If you set autoGridCount to true, this property is ignored.

default

5

gridPosition

gridPosition: string

Specifies if a grid line is placed on the center of a cell or on the beginning of a cell. Possible values are: "start" and "middle" This setting doesn't work if parseDates is set to true.

default

"middle"

gridThickness

gridThickness: number

Thickness of grid lines.

default

1

guides

guides: any[]

The array of guides belonging to this axis.

ignoreAxisWidth

ignoreAxisWidth: boolean

If autoMargins of a chart is set to true, but you want this axis not to be measured when calculating margin, set ignoreAxisWidth to true.

inside

inside: boolean

Specifies whether values should be placed inside or outside plot area.

labelFrequency

labelFrequency: number

Frequency at which labels should be placed. Doesn't work for CategoryAxis if parseDates is set to true.

default

1

labelRotation

labelRotation: number

Rotation angle of a label. Only horizontal axis' values can be rotated. If you set this for vertical axis, the setting will be ignored.

labelsEnabled

labelsEnabled: boolean

Specifies whether axis displays category axis' labels and value axis' values.

default

true

minPeriod

minPeriod: string

Specifies the shortest period of your data. This should be set only if parseDates is set to "true". Possible period values: fff - milliseconds, ss - seconds, mm - minutes, hh - hours, DD - days, MM - months, YYYY - years.

default

"DD"

minorGridEnabled

minorGridEnabled: boolean

Specifies if minor grid should be displayed. NOTE: If equalSpacing is set to true, this setting will be ignored.

default

false

offset

offset: number

The distance of the axis to the plot area, in pixels. Negative values can also be used.

parseDates

parseDates: boolean

In case your category axis values are Date objects, set this to true. In this case the chart will parse dates and will place your data points at irregular intervals. If you want dates to be parsed, but data points to be placed at equal intervals, set both parseDates and equalSpacing to true.

position

position: string

Possible values are: "top", "bottom", "left", "right". If axis is vertical, default position is "left". If axis is horizontal, default position is "bottom".

showFirstLabel

showFirstLabel: boolean

Whether to show first axis label or not.

default

true

showLastLabel

showLastLabel: boolean

Whether to show last axis label or not.

default

true

startOnAxis

startOnAxis: boolean

Specifies whether the graph should start on axis or not. In case you display columns, it is recommended to set this to false. If parseDates is set to true, startOnAxis will allways be false, unless equalSpacing is set to true.

tickLength

tickLength: number

Length of the tick marks.

default

5

title

title: string

Title of the axis.

titleBold

titleBold: boolean

Specifies if title should be bold or not.

default

true

titleColor

titleColor: string

Color of axis title. Will use text color of chart if not set any.

titlefontSize

titlefontSize: string

Font size of axis title. Will use font size of chart plus two pixels if not set any.

twoLineMode

twoLineMode: boolean

Works only when parseDates is set to true and equalSpacing is false. If you set it to true, at the position where bigger period changes, category axis will display date strings of bot small and big period, in two rows.

default

false

useLineColorForBulletBorder

useLineColorForBulletBorder: boolean

Use line color for bullet

default

false

Methods

addGuide

  • addGuide(guide: default): void
  • Adds guide to the axis.

    Parameters

    • guide: default

    Returns void

categoryToCoordinate

  • categoryToCoordinate(category: string): void
  • Number returns coordinate of a category. Works only if parseDates is false. If parseDates is true, use dateToCoordinate method.

    Parameters

    • category: string

    Returns void

coordinateToDate

  • coordinateToDate(coordinate: number): void
  • date - Date object Returns Date of the coordinate, in case parseDates is set to true and equalSpacing is set to false.

    Parameters

    • coordinate: number

    Returns void

dateToCoordinate

  • dateToCoordinate(date: Date): void
  • Number Returns coordinate of the date, in case parseDates is set to true. If parseDates is false, use categoryToCoordinate method.

    Parameters

    • date: Date

    Returns void

removeGuide

  • removeGuide(guide: default): void
  • Removes guide from the axis.

    Parameters

    • guide: default

    Returns void

xToIndex

  • xToIndex(x: number): void
  • Number Returns index of the category which is most close to specified coordinate.

    Parameters

    • x: number

    Returns void

Generated using TypeDoc