SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy

We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!

Answered
0
0

hi,
I use the following template for tooltip.
but the XValue and YValue are not coming in tooltip. SeriesName is coming though.
please give me some pointers.

<DataTemplate x:Key="CompassTooltipTemplate" DataType="s:SeriesInfo">
    <StackPanel>
        <StackPanel.Resources>
            <Style TargetType="TextBlock">
                <Setter Property="Foreground" Value="LightGray" />
                <Setter Property="FontSize" Value="12" />
            </Style>
        </StackPanel.Resources>
        <TextBlock Text="{Binding SeriesName}" />
        <StackPanel Orientation="Horizontal">               
            <TextBlock Text="{Binding YValue}" />
        </StackPanel>
        <StackPanel Orientation="Horizontal">               
            <TextBlock Text="{Binding XValue}" />
        </StackPanel>
    </StackPanel>
</DataTemplate>
Version
latest
  • You must to post comments
Best Answer
1
0

Hi Vibin,

Thanks for your question. The values don’t appear, because the properties are of the IComparable type. In XAML, to have a binding to a property of an interface type, you have to either specify StringFormat or to use ValueConverter.

SeriesInfo provides two additional properties FormattedXValue, FormattedYValue of type String. You could bind to these instead if you don’t want to modify the values.

Hope this helps!

Best regards,
Yuriy

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.