Hi,
We are using the Linear Gauge element on conjunction with the Bootstrap templating system (using classes like container, row and col-*).
We currently have a row with several columns but it seems that the LinearGauge does not scale properly when we use a percentage as width.
<div class="row">
<div class="col">
Column one data
</div>
<div class="col">
Column two data
</div>
<div class="col">
Column three data
</div>
<div class="col-5">
<SfLinearGauge Orientation="Orientation.Horizontal" Width="100%" Height="50px">
<LinearGaugeAxes>
<LinearGaugeAxis ShowLastLabel="false" Minimum="ViewModel.MinimumScore" Maximum="ViewModel.MaximumScore" IsInversed="false" OpposedPosition="false">
<LinearGaugeTooltipSettings Enable="true" ShowAtMousePosition="true" />
<LinearGaugeMajorTicks Interval="1" Height="0" />
<LinearGaugeMinorTicks Height="0" />
<LinearGaugeAxisLabelStyle>
<LinearGaugeAxisLabelFont Size="0" />
</LinearGaugeAxisLabelStyle>
<LinearGaugePointers>
<LinearGaugePointer Value="this.Score" Height="15" Width="15" Placement="Placement.Near" MarkerType="MarkerType.Triangle" Type="Point.Marker" Color="#757575" />
</LinearGaugePointers>
<LinearGaugeRanges>
<LinearGaugeRange Start="0" End="1" Color="#C00000" />
<LinearGaugeRange Start="1" End="2" Color="#F83C36" />
<LinearGaugeRange Start="2" End="3" Color="#FFC000" />
<LinearGaugeRange Start="3" End="4" Color="#92D050" />
<LinearGaugeRange Start="4" End="5" Color="#00B050" />
</LinearGaugeRanges>
</LinearGaugeAxis>
</LinearGaugeAxes>
</SfLinearGauge>
</div>
</div>
As shown, we indicate that the gauge should be 100% of its parent, which is sized b the "col-5" property. This is a CSS property that (I assume) sizes the column based on a percentage as well.
In normal situation, everything is well (I use a screen with fairly large resolution). However, one of my co-workers has a smaller screen and the component falls outside of the last (col-5) container which causes a part of it not to be visible. This also happens when we resize the browser to something smaller.
I would expect the gauge to resize accordingly but it seems that it does not resize at all.
Are we doing something wrong?
I have tried surrounding it with other div's as well but that doesn't solve my problem. Also I cannot give it a specific size (like 300px) because we do not know the size of the end users' screen.
Thanks.