Skip to content

Pie Diagram Config Schema ​

txt
https://mermaid.js.org/schemas/config.schema.json#/$defs/PieDiagramConfig
AbstractExtensibleStatusIdentifiableCustom PropertiesAdditional PropertiesAccess RestrictionsDefined In
Can be instantiatedNoUnknown statusNoForbiddenAllowednoneconfig.schema.json*

PieDiagramConfig Type ​

object (Pie Diagram Config)

all of

PieDiagramConfig Properties ​

PropertyTypeRequiredNullableDefined by
textPositionnumberOptionalcannot be nullMermaid Config
donutHolenumberOptionalcannot be nullMermaid Config
legendPositionstringOptionalcannot be nullMermaid Config
highlightSlicestringOptionalcannot be nullMermaid Config

textPosition ​

Axial position of slice's label from zero at the center to 1 at the outside edges.

textPosition

textPosition Type ​

number

textPosition Constraints ​

maximum: the value of this number must smaller than or equal to: 1

minimum: the value of this number must greater than or equal to: 0

textPosition Default Value ​

The default value is:

json
0.75

donutHole ​

Donut hole ratio. Valid value are from 0 to 0.9. Default to 0.

donutHole

donutHole Type ​

number

donutHole Constraints ​

maximum: the value of this number must smaller than or equal to: 0.9

minimum: the value of this number must greater than or equal to: 0

donutHole Default Value ​

The default value is:

json
0

legendPosition ​

Legend's position relative to the chart. Default to right.

legendPosition

legendPosition Type ​

string

legendPosition Constraints ​

enum: the value of this property must be equal to one of the following values:

ValueExplanation
"top"
"bottom"
"left"
"right"
"center"

legendPosition Default Value ​

The default value is:

json
"right"

highlightSlice ​

Highlight specific slice with matching label. Set to 'hover' to highlight hovered slice.

highlightSlice

highlightSlice Type ​

string

highlightSlice Default Value ​

The default value is:

json
""
Opens in mermaid.ai