views:

13

answers:

0

Hello,

I am using the StackedColumnSeries from the Silverlight toolkit to display some data. I am trying to create a list of checkboxes that each bind to a specific series' visibility, but the visibility doesn't change. I have implemented the BooleanToVisibility converter, and it reports back correctly, and the object reports back that it's visibility is collapsed, but the UI of the chart doesn't change. I am currently trying to do this entirely in the xaml

Here is the checkbox and chart in the xaml:

<CheckBox x:Name="ui_CheckBox">Box</CheckBox>

<chartingToolkit:Chart Title="Errors x:Name="x_ErrorChart">
<chartingToolkit:Chart.Series>
    <chartingToolkit:StackedColumnSeries>
        <chartingToolkit:SeriesDefinition 
            ItemsSource="{Binding Path=.}" 
            IndependentValueBinding="{Binding Path=Day, StringFormat='MM/dd'}" 
            DependentValueBinding="{Binding Data1}" 
            Title="Data1"
            Visibility="{Binding IsChecked, ElementName=ui_CheckBox, Converter={StaticResource BooleanToVisibilityConverter}}"/>
        <chartingToolkit:SeriesDefinition
            ItemsSource="{Binding Path=.}"
            IndependentValueBinding="{Binding Path=Day, StringFormat='MM/dd'}"
            DependentValueBinding="{Binding Data2}"
            Title="Data2" />
...

I have also tried explicitly setting the Visibility to Collapsed on the SeriesDefinition, and it renders just the same. Is this a missing part of the toolkit, or am I doing something incorrectly?

Thanks

Lev