Skip to main content

grid

Method of Figure.

Overloads

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

grid(const Map options) -> Figure

Sets the grid option map.

Parameters

  • options: Map of grid options.
    • id (string): Component ID.
    • show (boolean): Whether the grid is displayed.
    • left (string|number): Left offset.
    • top (string|number): Top offset.
    • right (string|number): Right offset.
    • bottom (string|number): Bottom offset.
    • width (string|number): Grid width.
    • height (string|number): Grid height.
    • contain_label (boolean): Contain axis labels in grid.
    • background_color (string): Background color.
    • border_color (Color): Border color.
    • border_width (number): Border width.
    • shadow_blur (number): Shadow blur.
    • shadow_color (Color): Shadow color.
    • shadow_offset_x (number): Shadow offset X.
    • shadow_offset_y (number): Shadow offset Y.
    • tooltip (Map): Grid tooltip options.
    • tooltip.trigger (string): Trigger: axis/item/none.
    • tooltip.axis_pointer (Map): Axis pointer options.
    • tooltip.show (boolean): Show tooltip.
    • tooltip.trigger_on (string): Trigger events: mousemove/click/none.
    • tooltip.background_color (Color): Tooltip background color.
    • tooltip.border_color (Color): Tooltip border color.
    • tooltip.border_width (number): Tooltip border width.
    • tooltip.padding (number|List): Tooltip padding.
    • tooltip.text_style (Map): Tooltip text style.
    • tooltip.text_style.color (Color): Text color.
    • tooltip.text_style.font_style (string): Font style.
    • tooltip.text_style.font_weight (string|number): Font weight.
    • tooltip.text_style.font_family (string): Font family.
    • tooltip.text_style.font_size (number): Font size.
    • tooltip.text_style.line_height (number): Line height.
    • tooltip.text_style.width (number): Text block width.
    • tooltip.text_style.height (number): Text block height.
    • tooltip.text_style.text_border_color (Color): Text stroke color.
    • tooltip.text_style.text_border_width (number): Text stroke width.
    • tooltip.text_style.text_border_type (string|number|List): Text stroke type.
    • tooltip.text_style.text_border_dash_offset (number): Text stroke dash offset.
    • tooltip.text_style.text_shadow_color (Color): Text shadow color.
    • tooltip.text_style.text_shadow_blur (number): Text shadow blur.
    • tooltip.text_style.text_shadow_offset_x (number): Text shadow offset X.
    • tooltip.text_style.text_shadow_offset_y (number): Text shadow offset Y.
    • tooltip.text_style.overflow (string): Overflow handling.
    • tooltip.text_style.ellipsis (string): Ellipsis when truncated.
    • tooltip.formatter (string): Tooltip formatter.
    • tooltip.extra_css_text (string): Extra CSS for tooltip.
    • zlevel (number): Canvas layer.
    • z (number): Z order.
    • axis_pointer (Map): Axis pointer options.
    • axis_pointer.show (boolean): Show axis pointer.
    • axis_pointer.trigger_tooltip (boolean): Trigger tooltip.
    • axis_pointer.trigger_on (string): Trigger events: mousemove/click/none.
    • axis_pointer.type (string): Pointer type: line/shadow/none.
    • axis_pointer.axis (string): Axis for pointer.
    • 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.cross_style (Map): Pointer cross style.
    • axis_pointer.animation (boolean): Enable axis pointer animation.
    • axis_pointer.animation_duration_update (number): Pointer animation duration on update.
    • axis_pointer.animation_easing_update (string): Pointer animation easing on update.

grid() -> Figure

Ensures grid exists with default options.