Constructor
Parameters:
| Name |
Type |
Description |
id |
String
|
The id of the component. |
properties |
Object
|
HTMLElement
|
The properties used to initialize the component or the container element. |
- Mixes In:
Returns:
An instance of the component.
-
Type
-
componyx.UI.PieChart
Extends
Classes
- PieChartEvents
- Segment
Members
baseColor :String
Gets or sets the base HEX color used for segments without a specified color. The colors of such segments are generated by shifting the hue of the base color.
Type:
(constant) classOption :Readonly.<Object.<string, string>>
Internal CSS class name constants.
You can override any of these classes on the Component instance by defining a property named
cssClass<Key> where is the PascalCase key from this object.
Example:
'PANEL' -> 'cssClassPanel'
Be cautious: overriding these classes without including the default names may break styling and functionality.
Type:
-
Readonly.<Object.<string, string>>
donutInnerRatio :Number
Gets or sets the inner hole size for DONUT variant as a ratio (0-1, where 0.6 = 60% hole).
Type:
Type:
- Overrides:
isHalf :Boolean
Gets or sets a value indicating whether the chart spans half a circle.
Type:
Gets or sets the content of the segment labels (VALUE, LABEL, LABEL_VALUE).
Type:
Gets or sets where the segment labels are displayed (NONE, INNER, or OUTER).
Type:
segmentLabelOffset :Number
Gets or sets the segment label positioning offset.
For OUTER labels: distance in pixels from chart edge (default: 20).
For INNER labels: position ratio from 0 (inner edge) to 1 (outer edge) (default: 0.5).
Type:
Gets or sets the list of segments.
Type:
Gets or sets the shape of the pie chart (PIE or DONUT).
Type:
showLegend :Boolean
Gets or sets a value indicating whether the legend is displayed.
Type:
showValuesInLegend :Boolean
Gets or sets a value indicating whether segment values are shown in the legend labels.
Type:
startAngle :Number
Gets or sets the start angle in degrees (0 = top, clockwise). Only applies to FULL variant.
Type:
Gets or sets the id of the component from which the settings are cloned for the tooltip manager used by the PieChart component.
Type:
(static, readonly) SegmentLabelContentOption :string
SegmentLabelContentOption
Type:
Properties:
| Name |
Type |
Description |
VALUE |
string
|
|
LABEL |
string
|
|
LABEL_VALUE |
string
|
|
(static, readonly) SegmentLabelDisplayOption :string
SegmentLabelDisplayOption
Type:
Properties:
| Name |
Type |
Description |
NONE |
string
|
|
INNER |
string
|
|
OUTER |
string
|
|
(static, readonly) ShapeOption :string
Type:
Properties:
| Name |
Type |
Description |
PIE |
string
|
|
DONUT |
string
|
|
Methods
(protected) cloneProperties(properties)
Clones component properties. This method should not be invoked by client code directly but only from inside component code.
Parameters:
| Name |
Type |
Description |
properties |
Object
|
The properties to clone. |
- Overrides:
(async) connectedCallback()
Invoked when the element is added to the DOM. Renders the component if not already in the rendering state.
- Overrides:
destroy(keepEvents, removeElement)
Parameters:
| Name |
Type |
Default |
Description |
keepEvents |
Boolean
|
|
A value indicating if component events should be kept. |
removeElement |
Boolean
|
true
|
A value indicating if the corresponding HTML Element should be removed. |
- Overrides:
- See:
-
disconnectedCallback()
Invoked when the element is removed from the DOM. Cleans up the component.
- Overrides:
getCssClass() → {String}
Gets the css class if it exists and otherwise the default css class.
- Overrides:
Returns:
-
Type
-
String
init()
Initializes the component with the specified properties.
- Overrides:
(protected) postRender()
Executes the post render procedure. This method should not be invoked by client code directly but only from inside component code.
- Overrides:
render()
- Overrides:
suppressNextChangeEvent(action)
Suppresses any change events fired by the underlying input element during the execution of the provided action. Use this when programmatically setting a component value to prevent the change event from propagating as a user interaction.
The suppression is automatically lifted after the action completes, even if it throws.
Parameters:
| Name |
Type |
Description |
action |
function
|
The action to execute with change events suppressed. |
- Mixes In:
suppressNextChangeEvent(action)
Suppresses any change events fired by the underlying input element during the execution of the provided action. Use this when programmatically setting a component value to prevent the change event from propagating as a user interaction.
The suppression is automatically lifted after the action completes, even if it throws.
Parameters:
| Name |
Type |
Description |
action |
function
|
The action to execute with change events suppressed. |
- Mixes In:
Type Definitions
CSSVariables
Type:
Properties:
| Name |
Type |
Attributes |
Description |
"--donut-inner-stop" |
string
|
<optional>
|
This CSS value is based on the donutInnerRatio setting. |