We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Chart Tooltip Data Binding

Thread ID:

Created:

Updated:

Platform:

Replies:

116276 May 8,2014 05:25 AM UTC May 10,2014 05:49 AM UTC WinRT 1
loading
Tags: Chart
Alex Ong
Asked On May 8, 2014 05:25 AM UTC

Hi,

Would like to ask what are the binding parameters for charts? I've created a DataTemplate as below:

<DataTemplate x:Key="ChartTooltipSeriesTemplate">
            <Border BorderBrush="Black" BorderThickness="2" Padding="10" Background="White">
                <StackPanel Orientation="Vertical">
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="Series : " />
                        <TextBlock Text="{Binding SeriesName}" />
                    </StackPanel>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="Category : " />
                        <TextBlock Text="{Binding XAxisLabel}" />
                    </StackPanel>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="Value : " />
                        <TextBlock Text="{Binding YData}" />
                    </StackPanel>
                </StackPanel>
            </Border>
        </DataTemplate>

Please advise what is the property name to be put in for the bold text? So far only YData is displaying.

Satheesh Kumar T [Syncfusion]
Replied On May 10, 2014 05:49 AM UTC

Hi Alex,

Thanks for using Syncfusion products.

We have analyzed your query and we would like to inform you that the corresponding series segment will be binding parameter for the tooltip. From that Segment, we can retrieve the required data. Based on your requirement we have modified tooltip template and highlighted changes need to be done in the binding. Please find the modified template below.

 [XAML]

<DataTemplate x:Key="ChartTooltipSeriesTemplate">

     <Border BorderBrush="Black" BorderThickness="2" Padding="10" >

        <StackPanel Orientation="Vertical">

            <StackPanel Orientation="Horizontal">

                <TextBlock Text="Series : " />

                <TextBlock Text="{Binding Series.Label}" />

            </StackPanel>

            <StackPanel Orientation="Horizontal">

                <TextBlock Text="Category : " />

                <TextBlock Text="{Binding Item.[XBindingPath]}" />

            </StackPanel>

            <StackPanel Orientation="Horizontal">

                 <TextBlock Text="Value : " />

                 <TextBlock Text="{Binding YData}" />

            </StackPanel>

        </StackPanel>

      </Border>

</DataTemplate>

Note:

[XBindingPath] Fill it with the corresponding series XBindingPath.

Please let us know if you have any queries.

Thanks

Satheesh Kumar T


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;