ChartAxisLabelProps
Defines the style settings for axis labels in a chart. Extends basic font properties and includes additional customization options.
Props
The following table outlines the props for the ChartAxisLabelProps:
| Name | Type | Default | Description |
|---|---|---|---|
| align | 'Center' | Determines the alignment of the text within its container. Available options:
| |
| color | string | '' | Sets the color of the text. Accepts any valid CSS color string, including hexadecimal and RGBA formats. |
| edgeLabelPlacement | 'Shift' | The
| |
| enableTrim | boolean | false | When set to |
| enableWrap | boolean | false | When set to |
| fontFamily | string | '' | Specifies the font family used for the text (e.g., 'Arial', 'Verdana', 'sans-serif'). |
| fontSize | string | '' | Sets the font size of the text in pixels. |
| fontStyle | string | 'Normal' | Specifies the font style of the text (e.g., 'Normal', 'Italic'). |
| fontWeight | string | 'Normal' | Specifies the font weight (thickness) of the text (e.g., 'Normal', 'Bold', '400'). |
| format | string | '' | Used to format the axis label. This property accepts global string formats such as |
| formatter | (value: number, text: string) => string | boolean | null | A callback function that allows for custom rendering of axis labels. This function is invoked for each axis label and receives the label's properties as an argument. Available arguments are:
|
| intersectAction | Trim | Specifies the action to take when axis labels intersect with each other. The available options are:
| |
| maxLabelWidth | number | 34 | Specifies the maximum width of an axis label. |
| opacity | number | 1 | Sets the opacity level of the text. A value of 1 means fully opaque, while 0 means fully transparent. |
| padding | number | 5 | The |
| placement | 'BetweenTicks' | The
| |
| position | 'Outside' | The
| |
| rotationAngle | number | 0 | Specifies the angle in degrees to rotate the axis label text. A positive value rotates the label clockwise, and a negative value rotates it counterclockwise. |
| skeleton | string | '' | Specifies the skeleton format used for processing date-time values. |