Hi Shivani,
Thank you for contacting Syncfusion support.
If we want the gauges to be responsive, we must set width and height of the parent div element to "100%" and also set circular gauge and linear gauge component "width" and "height" to "100%". The '.e-circulargauge' and '.e-lineargauge' classes inherit the width and height of the parent element. Then, in the dashboard layout component's "resizeStop" event, including the component's "Refresh()" method as well. Please see the code snippet below.
Code Snippet:
|
[app.component.html] </ejs-dashboardlayout (resizeStop)="onResizeStop($event)">
<ejs-lineargauge style='display:block;' width='100%' height=' 100%'></ejs-lineargauge>
<ejs-circulargauge style='display:block;' width='100%' height='100%'></ejs-circulargauge>
width: inherit !important;
height: inherit !important;
width: inherit !important;
height: inherit !important;
</style>
[app.component.ts]
onResizeStop(args: any) {
//.. } |
We have created a simple sample and it can be found at the stackblitz link below.
Please let us know if you need any further assistance.
Regards,
Indumathi R.