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

OverlappingStackedValueAxes

  • 名稱:Overlapping Value Axes(重疊 Value 圖軸)

  • 說明:

    • 在相同的繪圖區域內繪製兩個 Value 圖軸(左側 Y 軸和右側 Y 軸),預設會對應前兩個 Grid 資料。第一個 Y 軸用於搭配堆疊資料的圖形(目前有 MultiStackedBar),對應第一個 Grid(data$ 索引 [0] 資料);而第二個 Y 軸搭配一般非堆疊資料的圖形(比如 MultiLines),對應第二個 Grid(data$ 索引 [1] 資料)。
    • 和 MultiValueAxis 的差別在於需搭配 dataFormatter$ 的 separateGrid 要為 false,才能正確繪製在相同繪圖區域中。
  • Playground 範例

params$

  • 型別:DeepPartial<OverlappingStackedValueAxesParams>

  • 欄位:

    名稱說明型別
    firstAxis第一個(左側) Y 軸的設定Object
    secondAxis第二個(右側) Y 軸的設定Object
    gridIndexes對應的 data$ Grid 資料索引,可對應一組或多組 Grid 資料number[] | 'all'
  • params.firstAxis 及 params.secondAxis

    名稱說明型別
    labelOffset擺放位置[number, number]
    labelColorType和外框的間距ColorType
    axisLineVisible底色顏色類別boolean
    axisLineColorType邊框顏色類別ColorType
    ticks圖例的間隔距離number | null
    tickFormat列表圖示寬度string | ((text: d3.NumberValue) => string | d3.NumberValue
    tickLineVisible列表圖示高度boolean
    tickPadding列表圖示圓角寬度number
    tickFullLine文字顏色類別boolean
    tickFullLineDasharray文字顏色類別string
    tickColorType文字顏色類別ColorType
    tickTextRotate文字顏色類別number
    tickTextColorType文字顏色類別ColorType
詳細型別
type ColorType = 'none' | 'label' | 'labelContrast' | 'primary' | 'secondary' | 'background'
  • 預設值:
{
  firstAxis: {
    labelOffset: [0, 0],
    labelColorType: 'primary',
    axisLineVisible: false,
    axisLineColorType: 'primary',
    ticks: 4,
    tickFormat: ',.0f',
    tickLineVisible: true,
    tickPadding: 20,
    tickFullLine: true,
    tickFullLineDasharray: 'none',
    tickColorType: 'secondary',
    tickTextRotate: 0,
    tickTextColorType: 'primary',
  },
  secondAxis: {
    labelOffset: [0, 0],
    labelColorType: 'primary',
    axisLineVisible: false,
    axisLineColorType: 'primary',
    ticks: 4,
    tickFormat: ',.0f',
    tickLineVisible: true,
    tickPadding: 20,
    tickFullLine: true,
    tickFullLineDasharray: 'none',
    tickColorType: 'secondary',
    tickTextRotate: 0,
    tickTextColorType: 'primary',
  },
  gridIndexes: [0, 1]
}