﻿<Page
    x:Class="UWP.CartesianChart.MultiAxes.MultiAxesChart"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:UWP.CartesianChart.MultiAxes"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:lvc="using:LiveCharts.Uwp"
    mc:Ignorable="d">

    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
        </Grid.RowDefinitions>
        <TextBlock Grid.Row="0" TextWrapping="Wrap">
            You can create multiple axes, just set the Series.ScalesXAt or Series.ScalesYAt properties, you must also add the axis explicitly.
        </TextBlock>
        <lvc:CartesianChart Grid.Row="2">
            <lvc:CartesianChart.AxisY>
                <lvc:Axis Foreground="DodgerBlue" Title="Blue Axis"/>
                <lvc:Axis Foreground="IndianRed" Title="Red Axis" Position="RightTop" Separator="{x:Bind CleanSeparator}"/>
                <lvc:Axis Foreground="DarkOliveGreen" Title="Green Axis" Position="RightTop" Separator="{x:Bind CleanSeparator}"/>
            </lvc:CartesianChart.AxisY>
            <lvc:CartesianChart.Series>
                <lvc:LineSeries Values="{x:Bind LineValues1}" ScalesYAt="0"/>
                <!--Scales at blue axis, Axis[0]-->
                <lvc:LineSeries Values="{x:Bind LineValues2}"  ScalesYAt="1"/>
                <!--Scales at red axis, Axis[1]-->
                <lvc:LineSeries Values="{x:Bind LineValues3}"  ScalesYAt="2"/>
                <!--Scales at green axis, Axis[2]-->
            </lvc:CartesianChart.Series>
        </lvc:CartesianChart>
    </Grid>
</Page>
