|
<Window x:Class="CandleStickChart.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="CandleSticks" Height="538" Width="731"
xmlns:charting="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit"
xmlns:local="clr-namespace:CandleStickChart">
<Grid>
<Grid.Resources>
<local:CandleStickViewModelCollection x:Key="StockDataCollection"/>
</Grid.Resources>
<charting:Chart >
<local:CandleStickSeries
ItemsSource="{StaticResource StockDataCollection}"
IndependentValuePath="Date"
DependentValueBinding="{Binding Path=High}"
SizeValueBinding="{Binding Path=WickHeight}"
DataPointStyle="{StaticResource CandleStick}"
Title="Stock">
</local:CandleStickSeries>
<charting:Chart.Axes>
<!-- Axis for custom labels -->
<charting:DateTimeAxis Orientation="X">
<charting:DateTimeAxis.AxisLabelStyle>
<Style TargetType="charting:DateTimeAxisLabel">
<Setter Property="StringFormat" Value="{}{0:d}"/>
</Style>
</charting:DateTimeAxis.AxisLabelStyle>
</charting:DateTimeAxis>
</charting:Chart.Axes>
</charting:Chart>
</Grid>
</Window>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.