I want to hide YAxies when LineSeries is not showing.I have checkBoxes to show and hide LineSeries and property bool IsLineSeriesVisible.
<telerik:LineSeries ItemsSource="{Binding data, Mode=OneWay}" CategoryBinding="time" ValueBinding="value" >
<telerik:LineSeries.VerticalAxis>
<telerik:LinearAxis x:Name="yaxis" HorizontalLocation="Right" Title="{global:LocalizeKey TitleResKey, Default='value'}">
<telerik:LinearAxis.Style>
<Style TargetType="telerik:LinearAxis">
<Style.Triggers>
<DataTrigger Binding="{Binding IsLineSeriesVisible}" Value="False">
<Setter Property="Visibility" Value="Collapsed" />
</DataTrigger>
</Style.Triggers>
</Style>
</telerik:LinearAxis.Style>
</telerik:LinearAxis>
</telerik:LineSeries.VerticalAxis>
</telerik:LineSeries>
And this is my xaml, dataTrigger is not working when i remove trigger it hiddes yAxis but when i try to add trigger to hide axies when series is not showing it doesn`t do anything
Hello Djordje,
I tested the provided code snippet, and it is working fine on my side. I attached a sample solution where this behavior is implemented, and you could take a look.