This is a migrated thread and some comments may be shown as answers.

Switch ToolTip Template Based on Series Value

1 Answer 60 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Srikiran
Top achievements
Rank 1
Srikiran asked on 18 Jun 2015, 04:22 PM

Hi There,

We are plotting different series on RadCartesianChart. We would like to switch ToolTemplate based on Series i.e Each series will  show different templates.

We also want to show more properties(datafields) on Tooltip.Currently we can only show Xvalue and Yvalue.But we would like to show more information  for that specific point.Can we do this.?

Thankyou..

~Sn 

 

 

1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 19 Jun 2015, 06:44 AM
Hi Srikiran,

The chart's series expose a ToolTipTemplate property which you can use to define a template for each series. This property works with the ChartTooltipBehavior. About the displaying additional properties, keep in mind that the data context passed in the tooltip template is an object of type DataPoint which contains a DataItem property. This property holds the business object behind the corresponding data point. You can use it to display additional information in the tooltip.

Here is an example:
<telerik:BarSeries.ToolTipTemplate>
    <DataTemplate>
        <TextBlock Text="{Binding DataItem.MyProperty}" />
    </DataTemplate>
</telerik:BarSeries.ToolTipTemplate>

Please let me know if  you have any further questions.

Regards,
Martin
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
ChartView
Asked by
Srikiran
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Share this question
or