This section describes the Progress Bar events that will be triggered when appropriate actions are performed. Following events are available in the Progress Bar.
valueChanged
- When the progress value changes, this event is triggered.progressCompleted
- When the progress reaches the maximum value, this event is triggered.animationComplete
- When animation is enabled and the progress to the value is reached, this event is triggered.annotationRender
- Before each annotation is rendered, this event is triggered.textRender
- Before the progress text is rendered, this event is triggeredload
- When the control begins to render, this event is triggered.loaded
- After the control has been rendered, this event is triggered.resized
- When the window is resized, this event is triggered.var progressbar = new ej.progressbar.ProgressBar({
type: 'Linear',
trackThickness: 24,
progressThickness: 24,
height: '60',
width: '100%',
value: 50,
labelStyle: {
color: '#FFFFFF'
},
animation: {
enable: true,
duration: 2000,
delay: 0
},
valueChanged: (args) => {
// Here you can customize the code.
},
progressCompleted: (args) => {
// Here you can customize the code.
},
animationComplete: (args) => {
// Here you can customize the code.
},
textRender: (args) => {
// Here you can customize the code.
},
annotationRender: (args) => {
// Here you can customize the code.
},
load: (args) => {
// Here you can customize the code.
},
loaded: (args) => {
// Here you can customize the code.
},
resized: (args) => {
// Here you can customize the code.
}
});
progressbar.appendTo('#element');
<!DOCTYPE html><html lang="en"><head>
<title>Essential JS 2 Progress Bar</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Typescript Toolbar Controls">
<meta name="author" content="Syncfusion">
<link href="//cdn.syncfusion.com/ej2/21.2.3/material.css" rel="stylesheet">
<link href="index.css" rel="stylesheet">
<script src="https://cdn.syncfusion.com/ej2/21.2.3/dist/ej2.min.js" type="text/javascript"></script>
</head>
<body>
<div id="container">
<div class="row linear-parent">
<div id="element"></div>
</div>
</div>
<script>
var ele = document.getElementById('container');
if(ele) {
ele.style.visibility = "visible";
}
</script>
<script src="index.js" type="text/javascript"></script>
</body></html>