Pre loader

Set RenderableSeries visibility on databinding

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

0
0

Hi,

I’ve got a collection on FastLineRenderableSeries which are set to Visible true/false based for some boolean properties. At the moment I’ve been using IsVisible property and apparently it’s not working very reliably. Most of the time it works without issue. But time to time chart comes to a stage which it does not respect IsVisible property and make all series are Visible. It’s quite difficult to identify reproducible steps and it occurs randomly.

<visuals:SciChartSurface.RenderableSeries>
                                <renderableSeries:FastLineRenderableSeries x:Name="vaSeries" DataSeries="{Binding Path= Series[0], Mode=OneWay}" 
                                                                IsVisible="{Binding ElementName=ChkVa, Path=IsChecked, Mode=OneWay}"
                                                                SeriesColor="{StaticResource VaColor}" Style="{StaticResource SeriesStyleWithPoints}" />
                                <renderableSeries:FastLineRenderableSeries DataSeries="{Binding Series[1], Mode=OneWay}" 
                                                                IsVisible="{Binding ElementName=ChkVb, Path=IsChecked, Mode=OneWay}"
                                                                SeriesColor="{StaticResource VbColor}" Style="{StaticResource SeriesStyleWithPoints}" />
                                <renderableSeries:FastLineRenderableSeries DataSeries="{Binding Series[2], Mode=OneWay}" 
                                                                IsVisible="{Binding ElementName=ChkVc, Path=IsChecked, Mode=OneWay}"
                                                                SeriesColor="{StaticResource VcColor}" Style="{StaticResource SeriesStyleWithPoints}" />
                                <renderableSeries:FastLineRenderableSeries DataSeries="{Binding Series[3], Mode=OneWay}"
                                                                IsVisible="{Binding ElementName=ChkVr, Path=IsChecked, Mode=OneWay}"
                                                                SeriesColor="{StaticResource VrColor}" Style="{StaticResource SeriesStyleWithPoints}" />
                                <renderableSeries:FastLineRenderableSeries DataSeries="{Binding Series[4], Mode=OneWay}"
                                                                IsVisible="{Binding ElementName=ChkVs, Path=IsChecked, Mode=OneWay}"
                                                                SeriesColor="{StaticResource VsColor}" Style="{StaticResource SeriesStyleWithPoints}" />
                                <renderableSeries:FastLineRenderableSeries DataSeries="{Binding Series[5], Mode=OneWay}"
                                                                IsVisible="{Binding ElementName=ChkVt, Path=IsChecked, Mode=OneWay}"
                                                                SeriesColor="{StaticResource VtColor}" Style="{StaticResource SeriesStyleWithPoints}" />
                            </visuals:SciChartSurface.RenderableSeries>
  1. Any idea how this could happen?
  2. Noticed that there two properties for the purpose of making its visibility ‘IsVisible’ and ‘Visibility’. What is the most reliable property to use for setting Visibility of FastLineRenderable series?

Thanks!
Charith

  • You must to post comments
0
0

Hi Charith,

Thanks for reporting, we logged this issue and someone will take a look soon. It’s quite interesting issue, maybe it is connected to SciChartLegend? It is internally bound to visibility of series. Do you use it?
Also, I see that you use OneWay binding on IsVisible property. Does the state of checkboxes change when this issue happens? Can you change series visibility via them after?

And regarding the second, you should use IsVisible property for such purposes, because Visibility is inherited from Control class and doesn’t influence on series appearance as we use custom drawing system.

Best regards,
Yuriy

  • Charith Jayasundara
    Hi Yuriy, I don't use SciChartLegend at all. Also, I see that you use OneWay binding on IsVisible property. Does the state of checkboxes change when this issue happens? Can you change series visibility via them after? Once this issue started I cannot change Series visibility by checking/unchecking check boxes. Series are always visible regardless of the checkbox status. I am already using IsVisible property... Thanks & Regards, Charith
  • Yuriy Zadereckiy
    Hi Charith, I checked IsVisible property, there is only one place where it is set directly (and therefore all bindings are overridden except TwoWay), it is inside LegendModifier. Please, check you code if you don't set it somewhere accidentally. 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