<UserControl
    x:Class="ChartSamples.FinancialChart"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:ChartSamples"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:c1="using:C1.Xaml.Chart"
    mc:Ignorable="d" FontSize="16"
    d:DesignHeight="300"
    d:DesignWidth="400">

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition />
        </Grid.RowDefinitions>
        <StackPanel Margin="10,0,0,10" Orientation="Horizontal">
            <Button x:Name="btnNew" Content="New Data" Click="btnNew_Click" />
            <Button x:Name="btnVol" Content="Area" Click="btnVol_Click" ToolTipService.ToolTip="Change chart type" />
            <Button x:Name="btnPrice" Content="Standard" Click="btnPrice_Click" ToolTipService.ToolTip="Change chart type" />
        </StackPanel>
        <c1:C1Chart x:Name="chart" Grid.Row="1" c1:BarColumnOptions.Size="1" 
                         ChartType="Candle" Palette="Flow" >
            <c1:C1Chart.Data>
                <c1:ChartData>
                    <c1:ChartData.Children>
                        <c1:XYDataSeries
                            AxisY="Volume"
                            XValueBinding="{Binding Time}"
                            ValueBinding="{Binding Volume}" 
                            Label="Volume"/>
                        <c1:HighLowOpenCloseSeries
                            SymbolSize="20,20" 
                            SymbolStrokeThickness="2"
                            XValueBinding="{Binding Time}"
                            HighValueBinding="{Binding High}"
                            LowValueBinding="{Binding Low}"
                            OpenValueBinding="{Binding Open}"
                            CloseValueBinding="{Binding Close}"
                            Label="Price"/>

                    </c1:ChartData.Children>
                </c1:ChartData>
            </c1:C1Chart.Data>
            <c1:C1Chart.View>
                <c1:ChartView PlotBackground="White">
                    <c1:ChartView.AxisX>
                        <c1:Axis Scale="0.25">
                            <c1:Axis.ScrollBar>
                                <c1:AxisScrollBar />
                            </c1:Axis.ScrollBar>
                        </c1:Axis>
                    </c1:ChartView.AxisX>
                    <c1:ChartView.AxisY>
                        <c1:Axis Min="500" >
                            <c1:Axis.Title>
                                <TextBlock x:Name="txtPrice" Text="Price" TextAlignment="Center" HorizontalAlignment="Center"/>
                            </c1:Axis.Title>
                        </c1:Axis>
                    </c1:ChartView.AxisY>
                    <c1:ChartView.Axes>
                        <c1:Axis x:Name="Volume" Max="200" Position="Far" AxisType="Y"  >
                            <c1:Axis.Title>
                                <TextBlock x:Name="txtVol" Text="Volume" Width="80" TextAlignment="Center" HorizontalAlignment="Center"/>
                            </c1:Axis.Title>
                        </c1:Axis>
                    </c1:ChartView.Axes>
                </c1:ChartView>
            </c1:C1Chart.View>
            <c1:C1ChartLegend Background="Transparent" Position="TopLeft" Orientation="Horizontal" BorderBrush="Transparent"/>
        </c1:C1Chart>
    </Grid>
</UserControl>
