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

RacingBars

  • Name: Racing Bars

  • Description: Built-in counter to display data from the first to the last value.

  • Playground Example

params$

  • Type: DeepPartial<RacingBarsParams>

  • Fields:

    NameDescriptionType
    barSettings for the barsObject
    barLabelSettings for the label of the dataObject
    valueLabelSettings for the value of the dataObject
    axisLabelSettings for the X-axis labelObject
    rankingAmountNumber of items to display, default is 10. If set to 'auto', all data will be displayed if there is enough space'auto' | number
    autorunAuto-run state, default is stopped. Set to true to start runningboolean
    loopSet to repeat the raceboolean
  • params.bar

    NameDescriptionType
    barWidthWidth of each barnumber
    barPaddingPadding between barsnumber
    barRadiusRadius of bar cornersnumber | boolean
  • params.barLabel

    NameDescriptionType
    positionPosition of the label'inside' | 'outside' | 'none'
    paddingPaddingnumber
    colorTypeColor type of the labelColorType
  • params.valueLabel

    NameDescriptionType
    paddingPaddingnumber
    colorTypeColor type of the labelColorType
    formatFunction to format the label textstring | ((text: d3.NumberValue) => string | d3.NumberValue
  • params.axisLabel

    NameDescriptionType
    offsetPosition of the axis label[number, number]
    colorTypeColor type of the labelColorType
Detailed Types
type ColorType = 'none' | 'label' | 'labelContrast' | 'primary' | 'secondary' | 'background'
  • Default values:
{
  bar: {
    barWidth: number
    barPadding: number
    barRadius: number | boolean
  }
  barLabel: {
    position: 'inside' | 'outside' | 'none'
    padding: number
    rotate: number
    colorType: ColorType
  }
  valueLabel: {
    padding: number
    colorType: ColorType
    format: string | ((text: d3.NumberValue | null) => string | d3.NumberValue)
  }
  axisLabel: {
    offset: [number, number]
    colorType: ColorType
  }
  rankingAmount: 'auto' | number
  autorun: boolean
  loop: boolean
}