Hide YAxies

0 Answers 18 Views
Top achievements
Rank 1
Djordje asked on 30 Nov 2023, 02:59 PM

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:LinearAxis x:Name="yaxis" HorizontalLocation="Right" Title="{global:LocalizeKey TitleResKey, Default='value'}">
                                    <Style TargetType="telerik:LinearAxis">
                                            <DataTrigger Binding="{Binding IsLineSeriesVisible}" Value="False">
                                                <Setter Property="Visibility" Value="Collapsed" />

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

Telerik team
commented on 05 Dec 2023, 10:24 AM

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.

No answers yet. Maybe you can help?

Asked by
Top achievements
Rank 1
Share this question