Skip to content

Conversation

@AswiniDileep
Copy link

@AswiniDileep AswiniDileep commented Oct 30, 2025

Description

Updated UG for following KB [How to display tooltip and datalabels in release mode in Syncfusion SfCartesianChart]

Windows:

image

Android:

image

IOS:

image

@SyncfusionBuild
Copy link
Contributor

Build Status: INPROGRESS 🔃
Build Location: MAUI-988662-Added-howto-UG-for-KB

@SyncfusionBuild
Copy link
Contributor

CI Status: FAILURE ❌
Source Compilation: SUCCESS ✅
Failure Reason: CI Failure with violation
Build Location: MAUI-988662-Added-howto-UG-for-KB
Technical Error(s): 0
Spelling Error(s): 3
Image Alt Text Error(s): 0
Image Size Error(s): 0
Image Name Error(s): 0
Front matter Error(s): 2
File Path Error(s): 2
CodeSnippet File Path Missing Error(s): 0
Toc Anchor Tags Validation Error(s): 0
MD Tag Validation Error(s): 0

@SyncfusionBuild
Copy link
Contributor

Build Status: INPROGRESS 🔃
Build Location: MAUI-988662-Added-howto-UG-for-KB

@SyncfusionBuild
Copy link
Contributor

CI Status: FAILURE ❌
Source Compilation: SUCCESS ✅
Failure Reason: CI Failure with violation
Build Location: MAUI-988662-Added-howto-UG-for-KB
Technical Error(s): 0
Spelling Error(s): 3
Image Alt Text Error(s): 0
Image Size Error(s): 0
Image Name Error(s): 0
Front matter Error(s): 1
File Path Error(s): 2
CodeSnippet File Path Missing Error(s): 0
Toc Anchor Tags Validation Error(s): 0
MD Tag Validation Error(s): 0

@SyncfusionBuild
Copy link
Contributor

Build Status: INPROGRESS 🔃
Build Location: MAUI-988662-Added-howto-UG-for-KB

@SyncfusionBuild
Copy link
Contributor

CI Status: FAILURE ❌
Source Compilation: SUCCESS ✅
Failure Reason: CI Failure with violation
Build Location: MAUI-988662-Added-howto-UG-for-KB
Technical Error(s): 0
Spelling Error(s): 0
Image Alt Text Error(s): 0
Image Size Error(s): 0
Image Name Error(s): 0
Front matter Error(s): 1
File Path Error(s): 2
CodeSnippet File Path Missing Error(s): 0
Toc Anchor Tags Validation Error(s): 0
MD Tag Validation Error(s): 0

@SyncfusionBuild
Copy link
Contributor

Build Status: INPROGRESS 🔃
Build Location: MAUI-988662-Added-howto-UG-for-KB

@SyncfusionBuild
Copy link
Contributor

CI Status: FAILURE ❌
Source Compilation: SUCCESS ✅
Failure Reason: CI Failure with violation
Build Location: MAUI-988662-Added-howto-UG-for-KB
Technical Error(s): 0
Spelling Error(s): 0
Image Alt Text Error(s): 0
Image Size Error(s): 0
Image Name Error(s): 0
Front matter Error(s): 1
File Path Error(s): 0
CodeSnippet File Path Missing Error(s): 0
Toc Anchor Tags Validation Error(s): 0
MD Tag Validation Error(s): 0

@SyncfusionBuild
Copy link
Contributor

Build Status: INPROGRESS 🔃
Build Location: MAUI-988662-Added-howto-UG-for-KB

@SyncfusionBuild
Copy link
Contributor

CI Status: SUCCESS ✅
Source Compilation: SUCCESS ✅
Build Location: MAUI-988662-Added-howto-UG-for-KB
Technical Error(s): 0
Spelling Error(s): 0
Image Alt Text Error(s): 0
Image Size Error(s): 0
Image Name Error(s): 0
Front matter Error(s): 0
File Path Error(s): 0
CodeSnippet File Path Missing Error(s): 0
Toc Anchor Tags Validation Error(s): 0
MD Tag Validation Error(s): 0

@AswiniDileep AswiniDileep changed the title MAUI-988662 - [Others] Updated UG for KB MAUI-988662 - [Others] Updated UG for how to display tooltip and datalabels in release mode Oct 30, 2025
<DataTemplate x:Key="DataLabelTemplate">
<StackLayout x:DataType="chart:ChartDataLabel" Orientation="Vertical">
<Label Text="{Binding Item,
Converter={StaticResource TooltipConverter},

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As using same converter for both tooltip and datalabel rename the TooltipConverter with any common name.

Copy link
Author

@AswiniDileep AswiniDileep Nov 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to ValueConverter instead of TooltipConverter.

@SyncfusionBuild
Copy link
Contributor

Build Status: INPROGRESS 🔃
Build Location: MAUI-988662-Added-howto-UG-for-KB

@SyncfusionBuild
Copy link
Contributor

CI Status: SUCCESS ✅
Source Compilation: SUCCESS ✅
Build Location: MAUI-988662-Added-howto-UG-for-KB
Technical Error(s): 0
Spelling Error(s): 0
Image Alt Text Error(s): 0
Image Size Error(s): 0
Image Name Error(s): 0
Front matter Error(s): 0
File Path Error(s): 0
CodeSnippet File Path Missing Error(s): 0
Toc Anchor Tags Validation Error(s): 0
MD Tag Validation Error(s): 0


# Display tooltip and data labels in release mode

The binding context inside tooltip and data labels templates is not your model directly. These templates run in the scope of [TooltipInfo](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Charts.TooltipInfo.html) and [ChartDataLabel](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Charts.ChartDataLabel.html), which expose an `Item` property that contains the actual data model from the charts [ItemsSource](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Charts.ChartSeries.html#Syncfusion_Maui_Charts_ChartSeries_ItemsSource). To read your model’s fields in a template, bind through Item or use a converter.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Improve the content "The binding context inside tooltip and data labels templates is not your model directly." , Here the question is raised, why is it not binding directly?

The binding context inside tooltip and data labels templates is not your model directly. These templates run in the scope of [TooltipInfo](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Charts.TooltipInfo.html) and [ChartDataLabel](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Charts.ChartDataLabel.html), which expose an `Item` property that contains the actual data model from the charts [ItemsSource](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Charts.ChartSeries.html#Syncfusion_Maui_Charts_ChartSeries_ItemsSource). To read your model’s fields in a template, bind through Item or use a converter.


With .NET 9 compiled bindings, tooltip templates run with **x:DataType="chart:TooltipInfo"** and data label templates run with **x:DataType="chart:ChartDataLabel"**. Inside these templates, bind to the model via the Item property. Use a value converter to pull the required field from Item. In Release builds, trimming/AOT can remove XAML-only types, so preserve your ViewModel, Model, and the converter to keep these bindings working.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its a binding context x:DataType="chart:TooltipInfo

Content is not in a readable format "before Net 9 also, the same binding context we used." Improve the content.

public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
// value is TooltipInfo.Item or ChartDataLabel.Item -> your Model
if (value is Model model && parameter?.ToString() == "Planned")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mention the "Business model" and both tooltip and data label in comment line


## See also

[How to display tooltip and data labels in release mode .NET MAUI SfCartesianChart](https://support.syncfusion.com/kb/article/21677/why-tooltip-and-datalabel-are-not-showing-in-release-mode-in-net-maui-sfcartesianchart) No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update the "Why Tooltip and DataLabel Are Missing in Release Mode .NET MAUI Chart?" instead of "How to display tooltip and data labels in release mode .NET MAUI SfCartesianChart"

<li><a href="/maui-toolkit/cartesian-charts/Add-custom-labels">Add custom labels to the chart axis</a></li>
<li><a href="/maui-toolkit/cartesian-charts/Customize-each-chart-axis-label">Customize each chart axis label using the callback event</a></li>
<li><a href="/maui-toolkit/cartesian-charts/Get-the-data-point-collection-based-on-region">Get the data point collection based on region</a></li>
<li><a href="/maui-toolkit/cartesian-charts/Display-tooltip-datalabels-in-release-mode">Display tooltip and datalabels in release mode</a></li>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change title "Why Tooltip and Data Labels Not Visible in Release Mode?"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants