OrbCharts Docs
Docs
Home
Github
  • English
  • 繁體中文
Docs
Home
Github
  • English
  • 繁體中文
  • Guide
  • Basic Concepts

    • 6 Data Formats
    • Core Technologies
  • Get Started !

    • Installation
    • Examples
  • Basic Usage

    • Creating Charts
    • Using Presets
    • Drawing Charts
    • Data Labels
  • Chart API

    • plugins$
    • data$
    • chartParams$
    • dataFormatter$
    • event$
    • destroy()
  • Plugins

    • Create Plugin
    • Series

      • Bubbles
      • Pie
      • PieEventTexts
      • PieLabels
      • Rose
      • RoseLabels
      • SeriesLegend
      • SeriesTooltip
    • Grid

      • Bars
      • BarsPN
      • BarsTriangle
      • Dots
      • GridLegend
      • GridTooltip
      • GroupAux
      • GroupAxis
      • GroupZoom
      • Lines
      • LineAreas
      • StackedBars
      • StackedValueAxis
      • ValueAxis
    • MultiGrid

      • MultiBars
      • MultiBarsTriangle
      • MultiDots
      • MultiGridLegend
      • MultiGridTooltip
      • MultiGroupAxis
      • MultiStackedBars
      • MultiStackedValueAxis
      • MultiValueAxis
      • OverlappingValueAxes
      • OverlappingStackedValueAxes
    • MultiValue

      • MultiValueLegend
      • MultiValueTooltip
      • OrdinalAux
      • OrdinalAxis
      • OrdinalBubbles
      • OrdinalZoom
      • RacingBars
      • RacingCounterTexts
      • RacingValueAxis
      • Scatter
      • ScatterBubbles
      • XYAux
      • XYAxes
      • XYZoom
    • Relationship

      • ForceDirected
      • ForceDirectedBubbles
      • RelationshipLegend
      • RelationshipTooltip
    • Tree

      • TreeLegend
      • TreeMap
      • TreeTooltip

GroupAxis

  • Name: Group Axis

  • Description: Group axis (default is X axis, label text corresponds to columnLabels in dataFormatter$)

  • Usage: The axis format will be set with the groupAxis field in dataFormatter. For detailed API, please refer to the documentation (However, in most cases, if you are using Preset, you do not need to set dataFormatter yourself. More commonly used is the axis label setting)

  • Axis label setting: Use dataFormatter's groupAxis.label to set the label text, as shown below:

chart.dataFormatter$.next({
  groupAxis: {
    label: 'Region'
  }
})
  • Playground Example

params$

  • Type: Partial<GroupAxisParams>

  • Fields:

    NameDescriptionType
    labelOffsetAxis label offset[number, number]
    labelColorTypeAxis label color typeColorType
    axisLineVisibleShow axis lineboolean
    axisLineColorTypeAxis line color typeColorType
    ticksNumber of ticks
    * number: appropriate number
    * null: auto-detect
    * all: all
    number | null | 'all'
    tickFormatTick text format
    * string: annotated with d3-format format
    * Function: custom function returning display text
    string | ((text: d3.NumberValue) => string | d3.NumberValue)
    tickLineVisibleShow tick lineboolean
    tickPaddingDistance between tick and textnumber
    tickFullLineShow tick line across the entire sceneboolean
    tickFullLineDasharraySet tick line dash format (used with tickFullLine as true)string
    tickColorTypeTick color typeColorType
    tickTextRotateTick text rotationnumber
    tickTextColorTypeTick text color typeColorType
Detailed Types
type ColorType = 'none' | 'label' | 'labelContrast' | 'primary' | 'secondary' | 'background'
  • Default values:
{
  labelOffset: [0, 0],
  labelColorType: 'primary',
  axisLineVisible: true,
  axisLineColorType: 'primary',
  ticks: 'all',
  tickFormat: text => text,
  tickLineVisible: true,
  tickPadding: 20,
  tickFullLine: false,
  tickFullLineDasharray: 'none',
  tickColorType: 'secondary',
  tickTextRotate: 0,
  tickTextColorType: 'primary',
}