CircleProgress
Introduction
Circle Progress widget is a wrapper for Progress widget to display it in a circular form. This widget display progress only in percentage.
Function signature
Parameters
Parameters | Type | Description |
---|---|---|
progress | Progress | Supervisely Progress widget |
widget_id | str | ID of the widget |
progress
Supervisely Progress widget. You can read more about it here.
type: Progress
widget_id
ID of the widget.
type: str
default value: None
Attributes and Methods | Description |
---|---|
| Set one of the available statuses: |
Mini App Example
You can find this example in our Github repository:
supervisely-ecosystem/ui-widgets-demos/status-elements/009_circle_progress/src/main.py
Import libraries
Init API client
Init API for communicating with Supervisely Instance. First, we load environment variables with credentials:
Initialize widgets: Progress
, Circle Progress
and Button
Progress
, Circle Progress
and Button
Create app layout
Prepare a layout for app using Card
widget with the content
parameter and place variables circle_progress
and button
that we've just created to the container
variable, which uses Container
widget.
Create app using layout
Create an app object with layout parameter.
Our app layout is ready. Progress bar will appear after pressing the Start
button.
Start progress with button click
Use the decorator as shown below to handle button click. Progress
will be updating itself (pbar.update(1)
) every half second by 1 point as specified in sleep
function until it reaches total
.
Last updated