packages/components/eui-progress-circle/eui-progress-circle.component.ts
Circular progress indicator component that displays progress as a ring with customizable colors and labels. Supports automatic color transitions based on value thresholds and custom label positioning. Provides icon display option for visual enhancement and flexible sizing variants.
<eui-progress-circle [value]="65"></eui-progress-circle><eui-progress-circle [value]="80" valueLabel="4 of 5 tasks"></eui-progress-circle><eui-progress-circle [value]="100" icon="check" fillColor="success"></eui-progress-circle><eui-progress-circle [value]="45" colorSteps="25 75"></eui-progress-circle>isDefaultColorSteps="false" to disable automatic color transitionshasBottomLabel for longer text
AfterContentInit
OnChanges
AfterContentChecked
| changeDetection | ChangeDetectionStrategy.OnPush |
| encapsulation | ViewEncapsulation.None |
| HostDirectives |
BaseStatesDirective
Inputs : euiSizeS euiSizeM euiSizeL euiSizeVariant
|
| selector | eui-progress-circle |
| imports |
EUI_ICON
|
| templateUrl | ./eui-progress-circle.component.html |
| styleUrl | ./eui-progress-circle.scss |
Properties |
|
Methods |
Inputs |
HostBindings |
Accessors |
| ariaLabel |
Type : string
|
Default value : 'progress circle'
|
|
Accessibility label for the progress circle |
| tabindex |
Type : string
|
Default value : '0'
|
|
Tab index for accessibility |
| colorSteps |
|
Custom color step thresholds (space or comma separated values) Example : |
| colorType |
Default value : null, { transform: colorTypeTransform }
|
|
Override color type ('info', 'success', 'warning', 'danger') |
| emptyLabel |
Default value : 'N/A'
|
|
Label to display when value is 0 |
| fillColor |
|
Svg icon fill color option |
| hasBottomLabel |
Default value : false, { transform: booleanAttribute }
|
|
Whether to display the label at the bottom of the circle |
| icon |
|
Svg icon option |
| isDefaultColorSteps |
Default value : true, { transform: booleanAttribute }
|
|
Whether to use default color steps based on value thresholds |
| size |
Default value : 'm'
|
|
Svg icon size option |
| value |
Default value : 0, { transform: transformNumberInRange }
|
|
Current progress value (0-100) |
| valueLabel |
|
Custom label to display instead of percentage |
| class |
Type : string
|
|
CSS classes applied to the host element |
| setColorSteps |
| avoid using this method. It will become private in the future. |
setColorSteps()
|
|
Sets the color state based on value and thresholds
Returns :
void
|
| setLabels |
| avoid using this method. It will become private in the future. |
setLabels()
|
|
Sets the display label based on current value and configuration
Returns :
void
|
| Public isLongLabel |
Type : unknown
|
Default value : false
|
|
Whether the label exceeds a width threshold |
| Public labelValue |
Type : string
|
Default value : ''
|
|
Currently displayed label value |
| labelValueEl |
Type : ElementRef<HTMLSpanElement>
|
Decorators :
@ViewChild('labelValueEl')
|
|
Reference to the label value element |
| Public offsetWidth |
Type : number
|
Default value : 0
|
|
Current width of the label element |
| Public percentValue |
| This will be removed in next version of eui as it's unused |
Type : string
|
Default value : ''
|
|
Percentage value as string |
| Public roundedValue |
Type : number
|
|
Rounded value for display |
| Public stateColorNumberClass |
Type : string
|
Default value : ''
|
|
CSS class for the current color state |
| cssClasses |
getcssClasses()
|
|
CSS classes applied to the host element
Returns :
string
|