|
Query |
Details |
|
<WaterTemplateComponent> height needs to be 600px |
We have checked your query. We can use the parent element style to render the circular gauge with height and width as "100%". This gets the parent element height and width and renders the gauge. In the below sample we provided, we have made the circular gauge component as shared component and set 100% height and width to the shared component. So parent element in other files will provide size to the circular gauge. We have created the simple application to demonstrate the same and it can be downloaded from the link below the table.
In our provided sample, we have created the parent element height as 600px and then provided the component height as 100%. In the “CircularGaugeHeight” file, we have rendered the gauge with height 600px. We have created the parent element with height as 600px and the “WaterTemperatureGauge” component height as 100% |
|
each gauge is in its own parent div set to a height and width of 200px |
When we set the circular gauge with 100% height, we are unable to reproduce the reported issue of gauge gets cut when we provide the height as 200px. In the “Circulargauge” razor file of the provided sample, we have created the parent element height as 200px and component(WaterTemperatureGauge) height as 100%, the gauge gets rendered with height as 200px.
|
|
I have added a SfDashboardLayout component and in the component template for the first panel, I have a SfCircularGauge set to 100% height and width. On the second one I have my own WaterTemperatureGauge component (again just a wrapper). The result? The gauges won't fit to the container |
We can use the circular gauge inside the dashboard layout panel. When we resize the layout panel, we can refresh the gauge in the resize event of the layout panel by calling the Refresh() method of the circular gauge component. So the circular gauge gets re-rendered based on the panel size. In the “Index” razor file of the provided sample, we have created the SfCirculargauge component and WaterTemperatureGauge Component inside the layout.
|