<Grid.Resources>
<DataTemplate x:Key="labelTemplate">
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Series.Label}"/>
<TextBlock Text=" : "/>
<TextBlock Text="{Binding ValueY}"/>
</StackPanel>
</DataTemplate>
<DataTemplate x:Key="labelTemplate1">
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<TextBlock Text="High"/>
<TextBlock Text=" : "/>
<TextBlock Text="{Binding High}"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Low"/>
<TextBlock Text=" : "/>
<TextBlock Text="{Binding Low}"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Open"/>
<TextBlock Text=" : "/>
<TextBlock Text="{Binding Open}"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Close"/>
<TextBlock Text=" : "/>
<TextBlock Text="{Binding Close}"/>
</StackPanel>
</StackPanel>
</DataTemplate>
</Grid.Resources>
<chart:SfChart x:Name="chart">
<chart:SfChart.PrimaryAxis>
<chart:CategoryAxis />
</chart:SfChart.PrimaryAxis>
<chart:SfChart.SecondaryAxis>
<chart:NumericalAxis/>
</chart:SfChart.SecondaryAxis>
<chart:SfChart.Behaviors>
<chart:ChartTrackBallBehavior LabelDisplayMode="GroupAllPoints"/>
</chart:SfChart.Behaviors>
<chart:CandleSeries ItemsSource="{Binding StockPriceDetails}"
XBindingPath="Date" High="High" Open="Open"
Close="Close" Low="Low"
TrackBallLabelTemplate="{StaticResource labelTemplate1}" />
<chart:FastLineSeries Label="Fast Series1"
ItemsSource="{Binding StockPriceDetails}"
XBindingPath="Date" YBindingPath="YValue1"
TrackBallLabelTemplate="{StaticResource labelTemplate}" />
<chart:FastLineSeries Label="Fast Series2"
ItemsSource="{Binding StockPriceDetails}"
XBindingPath="Date" YBindingPath="YValue2"
TrackBallLabelTemplate="{StaticResource labelTemplate}" />
</chart:SfChart> |
<Grid.Resources>
<DataTemplate x:Key="labelTemplate">
<StackPanel Orientation="Horizontal">
<TextBlock>
<Run Text="{Binding Series.Label}"/>
<Run Text=" : "/>
<Run Text="{Binding ValueY}"/>
</TextBlock>
</StackPanel>
</DataTemplate>
<DataTemplate x:Key="labelTemplate1">
<StackPanel Orientation="Vertical">
<TextBlock>
<Run Text="High"/>
<Run Text=" : "/>
<Run Text="{Binding High}"/>
</TextBlock>
<TextBlock>
<Run Text="Low"/>
<Run Text=" : "/>
<Run Text="{Binding Low}"/>
</TextBlock>
<TextBlock>
<Run Text="Open"/>
<Run Text=" : "/>
<Run Text="{Binding Open}"/>
</TextBlock>
<TextBlock>
<Run Text="Close"/>
<Run Text=" : "/>
<Run Text="{Binding Close}"/>
</TextBlock>
</StackPanel>
</DataTemplate>
</Grid.Resources>
|
<TextBlock> <Run Text="Volume"/> <Run Text=" : "/> <Run Text="{Binding Volume}"/> </TextBlock> |
However this does not work, as the chart has no dependency on this.
What do I have to add to extend FastCandleBitmapSeries?
Greetings
Alexander
<DataTemplate x:Key="labelTemplate1">
<StackPanel Orientation="Vertical">
<TextBlock>
<Run Text="High"/>
<Run Text=" : "/>
<Run Text="{Binding High}"/>
</TextBlock>
<TextBlock>
<Run Text="Low"/>
<Run Text=" : "/>
<Run Text="{Binding Low}"/>
</TextBlock>
<TextBlock>
<Run Text="Open"/>
<Run Text=" : "/>
<Run Text="{Binding Open}"/>
</TextBlock>
<TextBlock>
<Run Text="Close"/>
<Run Text=" : "/>
<Run Text="{Binding Close}"/>
</TextBlock>
<TextBlock>
<Run Text="Volume"/>
<Run Text=" : "/>
<Run Text="{Binding Item.Volume}"/>
</TextBlock>
</StackPanel>
</DataTemplate> |