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

MultiValueAxis

  • Name: Multi Value Axis

  • Description: Functions similarly to the ValueAxis in the Grid data category, corresponding to each grid data by default, and drawing axes for each grid data separately. Note that dataFormatter$'s separateGrid must be true to correctly display multiple axes (otherwise they will overlap).

  • Usage: The axis format will be set using the dataFormatter's gridList[].valueAxis field. For detailed API, refer to the documentation (in most cases, if using Preset, you don't need to set dataFormatter manually, and it's more common to set axis labels).

  • Axis label settings: Use dataFormatter's gridList[].valueAxis.label to set the label text, as shown in the example below:

chart.dataFormatter$.next({
  gridList: [
    {
      valueAxis: {
        label: 'Quantity'
      }
    }
  ]
})
  • Playground Example

params$

  • Type: Partial<MultiValueAxisParams>

  • 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
    number | null
    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
    gridIndexesIndexes of the corresponding data$ grid data, can correspond to one or more grid datanumber[] | 'all'
Detailed Types
type ColorType = 'none' | 'label' | 'labelContrast' | 'primary' | 'secondary' | 'background'
  • Default values:
{
  labelOffset: [0, 0],
  labelColorType: 'primary',
  axisLineVisible: false,
  axisLineColorType: 'primary',
  ticks: 4,
  tickFormat: num => {
    if (num === null || Number.isNaN(num) == true) {
      return num || 0
    }
    var parts = num.toString().split('.')
    parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ',')
    return parts.join('.')
  },
  tickLineVisible: true,
  tickPadding: 20,
  tickFullLine: true,
  tickFullLineDasharray: 'none',
  tickColorType: 'secondary',
  tickTextRotate: 0,
  tickTextColorType: 'primary',
  gridIndexes: 'all'
}