OrbCharts 文件
文件
返回首頁
Github
  • English
  • 繁體中文
文件
返回首頁
Github
  • English
  • 繁體中文
  • 指南
  • 基本概念

    • 6種資料格式
    • 核心技術
  • 快速開始 !

    • 安裝
    • 範例
  • 基礎使用

    • 建立圖表
    • 使用預設集(Preset)
    • 繪製圖表
    • 資料標籤
  • 圖表 API

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

    • 建立 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

  • 名稱:RacingBars(賽跑長條圖)

  • 說明:內建計數器來顯示 value 中第 0 筆資料到最後一筆資料。

  • Playground 範例

params$

  • 型別:DeepPartial<RacingBarsParams>

  • 欄位:

    名稱說明型別
    bar長條圖的設定Object
    barLabel資料 label 的顯示設定Object
    valueLabel資料 value 的顯示設定Object
    axisLabelX軸標籤的顯示設定Object
    rankingAmount排名數量(顯示項目數量),預設為10,如設定為 'auto' 會在空間足夠下將所有資料顯示出來'auto' | number
    autorun賽跑啟動狀態,預設是靜止不動的,設定為 true 後才會開始跑boolean
    loop設定賽跑為重覆執行不停止boolean
  • params.bar

    名稱說明型別
    barWidth各別 Bar 寬度number
    barPaddingBar 間距number
    barRadiusBar 圓角寬度boolean
  • params.barLabel

    名稱說明型別
    position擺放位置'inside' | 'outside' | 'none'
    padding間距number
    colorType標籤顏色類別ColorType
  • params.valueLabel

    名稱說明型別
    padding間距number
    colorType標籤顏色類別ColorType
    format標籤顯示文字的函式string | ((text: d3.NumberValue) => string | d3.NumberValue
  • params.axisLabel

    名稱說明型別
    offset圖軸標籤擺放位置[number, number]
    colorType標籤顏色類別ColorType
詳細型別
type ColorType = 'none' | 'label' | 'labelContrast' | 'primary' | 'secondary' | 'background'
  • 預設值:
{
  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
}