Pre loader

How to show the Legends that have a corresponding visible RenderableSeries

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

1
0

How can I only show Legends when the corresponding RenederableSeries is visible.
If the corresponding RenderableSeries is not visible then that Legend shouldn’t be shown.
Keep in mind my users will be able to hide and show RenderableSeries during runtime.

My xaml code is:

                                            <s:LegendModifier x:Name="legendModifier" ShowVisibilityCheckboxes="False" Orientation="Vertical" ShowLegend="{Binding ParentViewModel.ShowLegends, Mode=TwoWay}" Margin="10" />
                                        <s:SeriesSelectionModifier>
                                            <s:SeriesSelectionModifier.SelectedSeriesStyle>
                                                <Style TargetType="s:BaseRenderableSeries">
                                                    <Setter Property="StrokeThickness" Value="3"/>
                                                </Style>
                                            </s:SeriesSelectionModifier.SelectedSeriesStyle>
                                        </s:SeriesSelectionModifier>
  • You must to post comments
0
0

Hi David,

If you take a look at our ChartLegends example, you could find similar behavior if you choose “SelectedSeries” from the LegendSource dropdown. It is configurable via the GetLegendDataFor property.

Hope this helps,

Best regards,
Yuriy

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies