<chart:SfChart x:Name="financialChart"
Margin="10">
<chart:SfChart.DataContext>
<local:ViewModel/>
</chart:SfChart.DataContext>
<chart:SfChart.RowDefinitions>
<chart:ChartRowDefinition/>
<chart:ChartRowDefinition/>
</chart:SfChart.RowDefinitions>
<chart:SfChart.PrimaryAxis>
<chart:CategoryAxis HeaderTemplate="{StaticResource headerTemplate}"
Header="Date" LabelFormat="MM/dd/yyyy"
LabelTemplate="{StaticResource labelTemplate}"
AxisLineStyle="{StaticResource axisStyle}"
MajorTickLineStyle="{StaticResource axisStyle}"/>
</chart:SfChart.PrimaryAxis>
<chart:SfChart.SecondaryAxis>
<!--1st Row-->
<chart:NumericalAxis StartRangeFromZero="False"
x:Name="axis2" Header="Stock Price"
OpposedPosition="True" chart:ChartBase.Row="1"/>
</chart:SfChart.SecondaryAxis>
<chart:CandleSeries Name="series" ItemsSource="{Binding StockPriceDetails}"
XBindingPath="Date" High="High" Open="Open"
Close="Close" Low="Low"
Label="Candleseries" ShowTooltip="True"
chart:ChartTooltip.EnableAnimation="True"/>
<chart:SfChart.TechnicalIndicators>
<chart:TriangularAverageIndicator
ItemsSource="{Binding StockPriceDetails}"
XBindingPath="Date" High="High" Open="Open"
Close="Close" Low="Low"
>
<chart:TriangularAverageIndicator.YAxis>
<!--0th Row-->
<chart:NumericalAxis OpposedPosition="True"/>
</chart:TriangularAverageIndicator.YAxis>
</chart:TriangularAverageIndicator>
</chart:SfChart.TechnicalIndicators>
</chart:SfChart> |