# 介面:DoughnutControllerDatasetOptions

# 階層

# 屬性

# animation

animation: false | AnimationSpec<"doughnut"> & { onComplete?: (this: Chart<keyof ChartTypeRegistry, (number | [number, number] | Point | BubbleDataPoint)[], unknown>, event: AnimationEvent) => void ; onProgress?: (this: Chart<keyof ChartTypeRegistry, (number | [number, number] | Point | BubbleDataPoint)[], unknown>, event: AnimationEvent) => void }

# 繼承自

AnimationOptions.animation

# 定義於

types/index.d.ts:1747 (開啟新視窗)


# animations

animations: AnimationsSpec<"doughnut">

# 繼承自

AnimationOptions.animations

# 定義於

types/index.d.ts:1757 (開啟新視窗)


# backgroundColor

backgroundColor: ScriptableAndArray<Color, ScriptableContext<"doughnut">>

# 繼承自

ScriptableAndArrayOptions.backgroundColor

# 定義於

types/index.d.ts:1807 (開啟新視窗)


# borderAlign

borderAlign: ScriptableAndArray<"center" | "inner", ScriptableContext<"doughnut">>

弧線筆觸對齊方式。

# 繼承自

ScriptableAndArrayOptions.borderAlign

# 定義於

types/index.d.ts:1833 (開啟新視窗)


# borderColor

borderColor: ScriptableAndArray<Color, ScriptableContext<"doughnut">>

# 繼承自

ScriptableAndArrayOptions.borderColor

# 定義於

types/index.d.ts:1806 (開啟新視窗)


# borderDash

borderDash: ScriptableAndArray<number[], ScriptableContext<"doughnut">>

虛線。請參閱 MDN。

預設值

[]

# 繼承自

ScriptableAndArrayOptions.borderDash

# 定義於

types/index.d.ts:1838 (開啟新視窗)


# borderDashOffset

borderDashOffset: ScriptableAndArray<number, ScriptableContext<"doughnut">>

虛線偏移量。請參閱 MDN。

預設值

0.0

# 繼承自

ScriptableAndArrayOptions.borderDashOffset

# 定義於

types/index.d.ts:1843 (開啟新視窗)


# borderJoinStyle

borderJoinStyle: ScriptableAndArray<CanvasLineJoin, ScriptableContext<"doughnut">>

線條接合樣式。請參閱 MDN。當 borderAlign 為 'inner' 時,預設值為 'round',否則為 'bevel'。

# 繼承自

ScriptableAndArrayOptions.borderJoinStyle

# 定義於

types/index.d.ts:1847 (開啟新視窗)


# borderRadius

borderRadius: ScriptableAndArray<number | ArcBorderRadius, ScriptableContext<"doughnut">>

設定圓弧的邊框半徑。

預設值

0

# 繼承自

ScriptableAndArrayOptions.borderRadius

# 定義於

types/index.d.ts:1853 (開啟新視窗)


# borderWidth

borderWidth: ScriptableAndArray<number, ScriptableContext<"doughnut">>

# 繼承自

ScriptableAndArrayOptions.borderWidth

# 定義於

types/index.d.ts:1805 (開啟新視窗)


# circular

circular: ScriptableAndArray<boolean, ScriptableContext<"doughnut">>

如果為 false,圓弧將會是平面的。

預設值

true

# 繼承自

ScriptableAndArrayOptions.circular

# 定義於

types/index.d.ts:1864 (開啟新視窗)


# circumference

circumference: number

掃過的範圍,允許圓弧覆蓋。

預設值

360

# 定義於

types/index.d.ts:257 (開啟新視窗)


# clip

clip: number | false | ChartArea

相對於圖表區域如何裁切。正值允許溢出,負值則在圖表區域內裁切該像素數量。0 = 在圖表區域裁切。裁切也可以針對每一側進行設定:clip: {left: 5, top: false, right: -2, bottom: 0}

# 繼承自

ControllerDatasetOptions.clip

# 定義於

types/index.d.ts:75 (開啟新視窗)


# hidden

hidden: boolean

設定資料集的顯示狀態。設為 true 以從圖表中隱藏資料集。

預設值

false

# 繼承自

ControllerDatasetOptions.hidden

# 定義於

types/index.d.ts:93 (開啟新視窗)


# hoverBackgroundColor

hoverBackgroundColor: ScriptableAndArray<Color, ScriptableContext<"doughnut">>

# 繼承自

ScriptableAndArrayOptions.hoverBackgroundColor

# 定義於

types/index.d.ts:1813 (開啟新視窗)


# hoverBorderColor

hoverBorderColor: ScriptableAndArray<Color, ScriptableContext<"doughnut">>

# 繼承自

ScriptableAndArrayOptions.hoverBorderColor

# 定義於

types/index.d.ts:1812 (開啟新視窗)


# hoverBorderDash

hoverBorderDash: ScriptableAndArray<number[], ScriptableContext<"doughnut">>

# 繼承自

ScriptableAndArrayOptions.hoverBorderDash

# 定義於

types/index.d.ts:1873 (開啟新視窗)


# hoverBorderDashOffset

hoverBorderDashOffset: ScriptableAndArray<number, ScriptableContext<"doughnut">>

# 繼承自

ScriptableAndArrayOptions.hoverBorderDashOffset

# 定義於

types/index.d.ts:1874 (開啟新視窗)


# hoverBorderWidth

hoverBorderWidth: ScriptableAndArray<number, ScriptableContext<"doughnut">>

# 繼承自

ScriptableAndArrayOptions.hoverBorderWidth

# 定義於

types/index.d.ts:1811 (開啟新視窗)


# hoverOffset

hoverOffset: ScriptableAndArray<number, ScriptableContext<"doughnut">>

# 繼承自

ScriptableAndArrayOptions.hoverOffset

# 定義於

types/index.d.ts:1875 (開啟新視窗)


# indexAxis

indexAxis: "x" | "y"

圖表的基本軸。垂直圖表為 'x',水平圖表為 'y'。

預設值

'x'

# 繼承自

ControllerDatasetOptions.indexAxis

# 定義於

types/index.d.ts:71 (開啟新視窗)


# label

label: string

資料集的標籤,會顯示在圖例和工具提示中。

# 繼承自

ControllerDatasetOptions.label

# 定義於

types/index.d.ts:79 (開啟新視窗)


# normalized

normalized: boolean

如果您的資料索引是唯一、已排序,且在資料集中保持一致,並提供 `normalized: true` 選項來告知 Chart.js,Chart.js 的運作速度會最快。

# 繼承自

ControllerDatasetOptions.normalized

# 定義於

types/index.d.ts:63 (開啟新視窗)


# offset

offset: number | number[]

圓弧偏移量(以像素為單位)。

# 覆寫

ScriptableAndArrayOptions.offset

# 定義於

types/index.d.ts:262 (開啟新視窗)


# order

order: number

資料集的繪製順序。也會影響堆疊、工具提示和圖例的順序。

# 繼承自

ControllerDatasetOptions.order

# 定義於

types/index.d.ts:83 (開啟新視窗)


# parsing

parsing: false | { [key: string]: string; }

如何解析資料集。可以透過在圖表選項或資料集中指定 `parsing: false` 來停用解析。如果停用解析,資料必須經過排序,且格式必須是相關圖表類型和刻度內部使用的格式。

# 繼承自

ControllerDatasetOptions.parsing

# 定義於

types/index.d.ts:54 (開啟新視窗)


# rotation

rotation: number

開始繪製此資料集的起始角度。

預設值

0

# 定義於

types/index.d.ts:268 (開啟新視窗)


# spacing

spacing: number

類似於 `offset` 選項,但適用於所有圓弧。這可以用來在圓弧之間添加間距。

預設值

0

# 覆寫

ScriptableAndArrayOptions.spacing

# 定義於

types/index.d.ts:281 (開啟新視窗)


# stack

stack: string

此資料集所屬的群組 ID(堆疊時,每個群組將是一個獨立的堆疊)。

# 繼承自

ControllerDatasetOptions.stack

# 定義於

types/index.d.ts:88 (開啟新視窗)


# transitions

transitions: TransitionsSpec<"doughnut">

# 繼承自

AnimationOptions.transitions

# 定義於

types/index.d.ts:1758 (開啟新視窗)


# weight

weight: number

資料集的相對厚度。提供權重值會使圓餅圖或甜甜圈圖資料集以相對於所有資料集權重值總和的厚度繪製。

預設值

1

# 定義於

types/index.d.ts:274 (開啟新視窗)