Hi George,
Thanks for using Syncfusion products.
We have prepared the sample by setting the adornment label template in code behind and please download the sample in the below location.
Sample: StackingSeries.zip
Please let us know if you need any further assistance.
Thanks,
Rachel. A
Hi George,
Thanks for your update.
We are able to specify format for Tooltip by using ToolTipTemplate property. In TooltipTemplate we can set string format for text block. We have prepared the sample based on your requirement and please download the sample in the below location.
Sample: Tooltip.zip
Please let us know if you have any queries.
Thanks,
Rachel. A
Hi George,
Thanks for your response.
Query 1: What YData stand for in Tooltip template?
The Data Context of ToolTipTemplate is ChartSegment and YData is a property of ChartSegment. YData property refers to the y value position of cursor in the secondary axis. The tooltip can also display the x value position of cursor in the primary axis by binding the XData property. When you want to display the value from the underline model then that value can be accessed from the Item Property as like below code snippet.
Code Snippet[C#]
binding.Path = new PropertyPath("Item.Price");
Query 2: StackingArea chart and also in a pie chart and it is not showing the tooltip.
We have tried to reproduce the issue in stacking series and pie series, but we are unable to reproduce the issue. The Y-value for the chart series is displayed in both series. We have prepared the below sample by using both series with tooltip. If problem occurs, please revert us sample with replication procedure in order to reproduce the issue. It would be much appreciable.
Sample: tooltip_modified.zip
Please let us know if you need any further assistance.
Thanks,
Rachel. A
Hi George,
Thanks for the update.
Please let us know if you require further assistance on this.
Thanks,
Rachel. A
Hi George,
Thank you for the update.
In CategoryAxis, Tooltip XData property will return the index position of data point (i.e., each segment). In order to display the x axis values of each segment in ToolTip, we need to bind the Item property as shown in the below code snippet.
Code Snippet:
binding1.Path = new PropertyPath("Item.ProdId");
We have modified the sample based on your requirement and please download the sample in the below location.
Sample: custom_tooltip.zip
Note: For NumericAxis, we can directly use the XData property and for DateTimeAxis or TimeSpanAxis we can get x axis value by converting double to DateTime.
Please refer the documentation link for more information
Link: http://help.syncfusion.com/ug/wpf/default.htm#!documents/customizetooltip.htm
Please let us know if you require further assistance on this.
Thanks,
Rachel. A
Hi George,
Thank you for your response.
When use Data Table ItemsSource, the corresponding segment Data Row objects (underline objects) will be stored in Item property. So we can get x axis value of each segment through the Data Row’s ItemArray property as shown in the below code snippet.
Code Snippet:
binding1.Path = new PropertyPath("Item.ItemArray[1]");
We have modified the sample based on this requirement and please download the sample in the below location.
Sample: datatable_tooltip.zip
Please let us know if you have any queries.
Thanks,
Rachel. A