<UserControl x:Class="FlexChartExplorer.Waterfall"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:FlexChartExplorer"
             xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml"
             DataContext="{Binding RelativeSource={RelativeSource Mode=Self}}"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition />
        </Grid.RowDefinitions>
        <Grid Margin="10 0 0 0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition />
                <ColumnDefinition />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <CheckBox Content="Is RelativeData" IsChecked="{Binding ElementName=wf, Path=RelativeData, Mode=TwoWay}"/>
            <CheckBox Content="Show Connector Lines" Grid.Column="1" IsChecked="{Binding ElementName=wf, Path=ConnectorLines, Mode=TwoWay}"/>
            <CheckBox Content="Show Total" Grid.Column="2" IsChecked="{Binding ElementName=wf, Path=ShowTotal, Mode=TwoWay}"/>
            <CheckBox Content="Show Intermediate Total" Grid.Column="3" IsChecked="{Binding ElementName=wf, Path=ShowIntermediateTotal, Mode=TwoWay}" />
        </Grid>
        <c1:C1FlexChart Grid.Row="1" ToolTipContent="{}{x}&#x000A;Value: {y}" Binding="Value" BindingX="Name" ItemsSource="{Binding Data}">
            <c1:Waterfall x:Name="wf" RelativeData="True" ConnectorLines="True" ShowTotal="True" Start="100" 
                          ShowIntermediateTotal="True" IntermediateTotalLabels="Q1,Q2,Q3,Q4"
                          SeriesName="Increase, Decrease, Total">
                <c1:Waterfall.StartStyle>
                    <c1:ChartStyle Fill="#7dc7ed" />
                </c1:Waterfall.StartStyle>
                <c1:Waterfall.FallingStyle>
                    <c1:ChartStyle Fill="#dd2714" />
                </c1:Waterfall.FallingStyle>
                <c1:Waterfall.RisingStyle>
                    <c1:ChartStyle Fill="#0f9d58" Stroke="#0f9d58" />
                </c1:Waterfall.RisingStyle>
                <c1:Waterfall.IntermediateTotalStyle>
                    <c1:ChartStyle Fill="#7dc7ed" />
                </c1:Waterfall.IntermediateTotalStyle>
                <c1:Waterfall.TotalStyle>
                    <c1:ChartStyle Fill="#7dc7ed" />
                </c1:Waterfall.TotalStyle>
                <c1:Waterfall.ConnectorLineStyle>
                    <c1:ChartStyle Stroke="#333" StrokeDashArray="5,5"/>
                </c1:Waterfall.ConnectorLineStyle>
            </c1:Waterfall>
        </c1:C1FlexChart>
    </Grid>
</UserControl>