Skip to main content

x_axis

Method of Figure.

Overloads

NameDescription
x_axis() -> FigureEnsures xAxis exists with default options.
x_axis(const Map options) -> FigureSets the xAxis option map.

x_axis() -> Figure

Ensures xAxis exists with default options.

x_axis(const Map options) -> Figure

Sets the xAxis option map.

Parameters

  • options: Map of xAxis options.
    • id (string): Component ID.
    • show (boolean): Whether the axis is displayed.
    • grid_index (number): Index of the grid this axis belongs to.
    • align_ticks (boolean): Whether to align ticks across multiple value/log axes.
    • position (string): Axis position: 'top' or 'bottom'.
    • offset (number): Offset relative to the default position.
    • type (string): Axis type: 'value', 'category', 'time', 'log'.
    • name (string): Axis name.
    • name_location (string): Name location: 'start', 'middle'/'center', 'end'.
    • name_text_style (Map): Text style for axis name.
    • name_text_style.color (Color): Name color.
    • name_text_style.font_style (string): Font style: normal/italic/oblique.
    • name_text_style.font_weight (string|number): Font weight.
    • name_text_style.font_family (string): Font family.
    • name_text_style.font_size (number): Font size.
    • name_text_style.align (string): Horizontal alignment.
    • name_text_style.vertical_align (string): Vertical alignment.
    • name_text_style.line_height (number): Line height.
    • name_text_style.background_color (string|Map): Background color or image.
    • name_text_style.border_color (Color): Border color.
    • name_text_style.border_width (number): Border width.
    • name_text_style.border_type (string|number|List): Border type or dash array.
    • name_text_style.border_dash_offset (number): Border dash offset.
    • name_text_style.border_radius (number): Border radius.
    • name_text_style.padding (number|List): Padding for the text block.
    • name_text_style.shadow_color (Color): Shadow color.
    • name_text_style.shadow_blur (number): Shadow blur.
    • name_text_style.shadow_offset_x (number): Shadow offset X.
    • name_text_style.shadow_offset_y (number): Shadow offset Y.
    • name_text_style.width (number): Text block width.
    • name_text_style.height (number): Text block height.
    • name_text_style.text_border_color (Color): Text stroke color.
    • name_text_style.text_border_width (number): Text stroke width.
    • name_text_style.text_border_type (string|number|List): Text stroke type or dash array.
    • name_text_style.text_border_dash_offset (number): Text stroke dash offset.
    • name_text_style.text_shadow_color (Color): Text shadow color.
    • name_text_style.text_shadow_blur (number): Text shadow blur.
    • name_text_style.text_shadow_offset_x (number): Text shadow offset X.
    • name_text_style.text_shadow_offset_y (number): Text shadow offset Y.
    • name_text_style.overflow (string): Overflow handling: truncate/break/breakAll.
    • name_text_style.ellipsis (string): Ellipsis when truncated.
    • name_text_style.rich (Map): Rich text styles.
    • name_text_style.rich_inherit_plain_label (boolean): Whether rich text inherits plain styles.
    • name_gap (number): Gap between axis name and axis line.
    • name_rotate (number): Axis name rotation.
    • name_truncate (Map): Axis name truncation.
    • name_truncate.max_width (number): Truncation max width.
    • name_truncate.ellipsis (string): Truncation ellipsis.
    • name_move_overlap (boolean): Whether to move name to avoid overlap.
    • inverse (boolean): Invert axis direction.
    • boundary_gap (boolean|List): Boundary gap for category or value/time/log axes.
    • min (number|string): Axis minimum value or 'dataMin'.
    • max (number|string): Axis maximum value or 'dataMax'.
    • scale (boolean): Whether to avoid forcing zero on value axes.
    • split_number (number): Recommended number of segments.
    • min_interval (number): Minimum interval between ticks.
    • max_interval (number): Maximum interval between ticks.
    • interval (number): Force interval between ticks.
    • log_base (number): Log axis base.
    • start_value (number): Start value for the axis.
    • silent (boolean): Disable interaction.
    • trigger_event (boolean): Enable event triggering.
    • jitter (number): Scatter jitter in pixels.
    • jitter_overlap (boolean): Allow overlap when jittering.
    • jitter_margin (number): Minimum distance between jittered scatters.
    • breaks (List): Axis breaks definition.
    • breaks.start (string|number|Date): Break start value.
    • breaks.end (string|number|Date): Break end value.
    • breaks.gap (number|string): Break visual size.
    • breaks.is_expanded (boolean): Whether break is expanded.
    • break_area (Map): Axis break area style.
    • break_area.show (boolean): Show break area.
    • break_area.item_style (Map): Break area item style.
    • break_area.zigzag_amplitude (number): Zigzag amplitude in pixels.
    • break_area.zigzag_min_span (number): Min zigzag span.
    • break_area.zigzag_max_span (number): Max zigzag span.
    • break_area.zigzag_z (number): Z order of zigzag.
    • break_area.expand_on_click (boolean): Expand on click.
    • break_label_layout (Map): Break label layout.
    • break_label_layout.move_overlap (string|boolean): Move overlapped break labels.
    • axis_line (Map): Axis line options.
    • axis_line.show (boolean): Show axis line.
    • axis_line.on_zero (boolean): Align axis at zero on the other axis.
    • axis_line.on_zero_axis_index (number): Axis index for onZero.
    • axis_line.symbol (string|List): Symbols at axis ends.
    • axis_line.symbol_size (List): Symbol size.
    • axis_line.symbol_offset (number|List): Symbol offset.
    • axis_line.line_style (Map): Axis line style.
    • axis_tick (Map): Axis tick options.
    • axis_tick.show (boolean): Show axis ticks.
    • axis_tick.align_with_label (boolean): Align ticks with labels.
    • axis_tick.interval (number): Tick interval.
    • axis_tick.inside (boolean): Ticks inside the axis.
    • axis_tick.length (number): Tick length.
    • axis_tick.line_style (Map): Tick line style.
    • axis_tick.custom_values (List): Custom tick positions.
    • minor_tick (Map): Minor tick options.
    • minor_tick.show (boolean): Show minor ticks.
    • minor_tick.split_number (number): Minor tick split number.
    • minor_tick.length (number): Minor tick length.
    • minor_tick.line_style (Map): Minor tick line style.
    • axis_label (Map): Axis label options.
    • axis_label.show (boolean): Show axis labels.
    • axis_label.interval (number): Label interval.
    • axis_label.inside (boolean): Labels inside the axis.
    • axis_label.rotate (number): Label rotation.
    • axis_label.margin (number): Label margin.
    • axis_label.formatter (string|Map): Label formatter.
    • axis_label.show_min_label (boolean): Show min label.
    • axis_label.show_max_label (boolean): Show max label.
    • axis_label.align_min_label (string): Alignment of min label.
    • axis_label.align_max_label (string): Alignment of max label.
    • axis_label.hide_overlap (boolean): Hide overlapped labels.
    • axis_label.custom_values (List): Custom label positions.
    • axis_label.color (Color): Label color.
    • axis_label.font_style (string): Label font style.
    • axis_label.font_weight (string|number): Label font weight.
    • axis_label.font_family (string): Label font family.
    • axis_label.font_size (number): Label font size.
    • axis_label.align (string): Label horizontal alignment.
    • axis_label.vertical_align (string): Label vertical alignment.
    • axis_label.line_height (number): Label line height.
    • axis_label.background_color (string|Map): Label background.
    • axis_label.border_color (Color): Label border color.
    • axis_label.border_width (number): Label border width.
    • axis_label.border_type (string|number|List): Label border type.
    • axis_label.border_dash_offset (number): Label border dash offset.
    • axis_label.border_radius (number): Label border radius.
    • axis_label.padding (number|List): Label padding.
    • axis_label.shadow_color (Color): Label shadow color.
    • axis_label.shadow_blur (number): Label shadow blur.
    • axis_label.shadow_offset_x (number): Label shadow offset X.
    • axis_label.shadow_offset_y (number): Label shadow offset Y.
    • axis_label.width (number): Label width.
    • axis_label.height (number): Label height.
    • axis_label.text_border_color (Color): Label text stroke color.
    • axis_label.text_border_width (number): Label text stroke width.
    • axis_label.text_border_type (string|number|List): Label text stroke type.
    • axis_label.text_border_dash_offset (number): Label text stroke dash offset.
    • axis_label.text_shadow_color (Color): Label text shadow color.
    • axis_label.text_shadow_blur (number): Label text shadow blur.
    • axis_label.text_shadow_offset_x (number): Label text shadow offset X.
    • axis_label.text_shadow_offset_y (number): Label text shadow offset Y.
    • axis_label.overflow (string): Label overflow handling.
    • axis_label.ellipsis (string): Label ellipsis.
    • axis_label.rich (Map): Label rich text styles.
    • axis_label.rich_inherit_plain_label (boolean): Rich text inherits plain styles.
    • split_line (Map): Split line options.
    • split_line.show (boolean): Show split lines.
    • split_line.show_min_line (boolean): Show min split line.
    • split_line.show_max_line (boolean): Show max split line.
    • split_line.interval (number): Split line interval.
    • split_line.line_style (Map): Split line style.
    • minor_split_line (Map): Minor split line options.
    • minor_split_line.show (boolean): Show minor split lines.
    • minor_split_line.line_style (Map): Minor split line style.
    • split_area (Map): Split area options.
    • split_area.interval (number): Split area interval.
    • split_area.show (boolean): Show split area.
    • split_area.area_style (Map): Split area style.
    • data (List): Category axis data.
    • axis_pointer (Map): Axis pointer options.
    • axis_pointer.show (boolean): Show axis pointer.
    • axis_pointer.type (string): Pointer type: line/shadow/none.
    • axis_pointer.snap (boolean): Snap to nearest point.
    • axis_pointer.z (number): Pointer z order.
    • axis_pointer.label (Map): Pointer label options.
    • axis_pointer.line_style (Map): Pointer line style.
    • axis_pointer.shadow_style (Map): Pointer shadow style.
    • axis_pointer.trigger_emphasis (boolean): Trigger emphasis.
    • axis_pointer.trigger_tooltip (boolean): Trigger tooltip.
    • axis_pointer.value (number): Pointer value.
    • axis_pointer.status (boolean): Pointer status.
    • axis_pointer.handle (Map): Pointer handle options.
    • tooltip (Map): Axis tooltip options.
    • animation (boolean): Enable animation.
    • animation_threshold (number): Animation threshold.
    • animation_duration (number): Initial animation duration.
    • animation_easing (string): Initial animation easing.
    • animation_delay (number): Initial animation delay.
    • animation_duration_update (number): Update animation duration.
    • animation_easing_update (string): Update animation easing.
    • animation_delay_update (number): Update animation delay.
    • zlevel (number): Canvas layer.
    • z (number): Z order.