Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
0a18092
updated the padding image
Vallarasu4653 Sep 18, 2025
6340333
removed without padding code
Vallarasu4653 Sep 23, 2025
fd416dd
commit
EzhilarasanElangovan31 Sep 24, 2025
cf7930f
commit
EzhilarasanElangovan31 Sep 24, 2025
9092e1d
Update Getting-Started.md
VimalaThirumalaikumar Sep 25, 2025
1137b54
Update DataLabels.md
VimalaThirumalaikumar Sep 25, 2025
6c0f9e0
Update getting-started.md
VimalaThirumalaikumar Sep 25, 2025
0751935
Merge pull request #374 from syncfusion-content/update-API-reference-…
Saravanan-Madhesh Sep 25, 2025
2ce8621
Merge pull request #372 from syncfusion-content/update_sparkchart_image
Saravanan-Madhesh Sep 25, 2025
769410b
MAUI-983567 - [Others] Updated axis line page UG
AswiniDileep Oct 27, 2025
ba257b3
MAUI-983567 - [Others] Updated file name
AswiniDileep Oct 27, 2025
5c095eb
MAUI-983567 - [Others] Updated syncfusion tread mark
AswiniDileep Oct 27, 2025
330e314
MAUI-988662-[Others]: Updated UG content for KB
AswiniDileep Oct 30, 2025
c3bb5b0
Updated content and images for UG
AswiniDileep Nov 4, 2025
a96b934
Updated title as axis customization
AswiniDileep Nov 4, 2025
1d16c97
Updated demo with proper image size
AswiniDileep Nov 4, 2025
f3e4409
Updated name of image
AswiniDileep Nov 4, 2025
38da213
MAUI-988662-[Others]: Updated UG with proper code lines
AswiniDileep Nov 5, 2025
82ae4be
Addressed review suggestions
AswiniDileep Dec 2, 2025
38aaf14
updated review suggestions
AswiniDileep Dec 3, 2025
2595ea4
Addressed review suggestion
AswiniDileep Dec 8, 2025
10e4316
Updated question mark
AswiniDileep Dec 8, 2025
81c0c26
Updated tab tag
AswiniDileep Dec 8, 2025
3024b14
Added keywords and updated title
AswiniDileep Dec 11, 2025
90abdc4
Updated how to section content
AswiniDileep Dec 11, 2025
67fd844
Updated the code , api link
SaiyathAliFathima Dec 11, 2025
e7275c3
Removed unwanted code line
AswiniDileep Dec 11, 2025
50a0925
Update axis line UG
AswiniDileep Dec 11, 2025
fdd63f0
Improved the content
SaiyathAliFathima Dec 11, 2025
1352084
Update maui-toolkit-toc.html
SaiyathAliFathima Dec 11, 2025
e04260d
Update maui-toolkit-toc.html
SaiyathAliFathima Dec 11, 2025
a58198d
Updated the name
SaiyathAliFathima Dec 11, 2025
a45a132
Merge pull request #383 from syncfusion-content/MAUI-988662-Hotfix-ad…
Saravanan-Madhesh Dec 11, 2025
000ba1a
Merge pull request #380 from syncfusion-content/MAUI-983567-Axis-line…
Saravanan-Madhesh Dec 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions maui-toolkit-toc.html
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@
<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-and-data-labels-in-release-mode">Display tooltip and data labels in release mode</a></li>
</ul>
</li>
</ul>
Expand Down Expand Up @@ -483,6 +484,7 @@
<li><a href="/maui-toolkit/Spark-Charts/sparkchart-types">Sparkline Types</a></li>
<li><a href="/maui-toolkit/Spark-Charts/markers">Markers</a></li>
<li><a href="/maui-toolkit/Spark-Charts/customize-datapoints">Customize Data Points</a></li>
<li><a href="/maui-toolkit/Spark-Charts/sparkchart-axis">Axis</a></li>
</ul>
</li>
<li>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
---
layout: post
title: Show tooltip and datalabels in release mode | Syncfusion
description: Learn here all about displaying tooltip and datalabels in release mode in SfCartesianChart in Syncfusion® .NET MAUI Chart (SfCartesianChart) control.
platform: maui-toolkit
control: SfCartesianChart
documentation: ug
keywords: .NET MAUI chart tooltip, .NET MAUI chart data label, TooltipInfo Item binding, ChartDataLabel Item binding, Release mode trimming, Preserve attribute MAUI.
---

# Display tooltip and data labels in release mode
In [SfCartesianChart](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Charts.SfCartesianChart.html), tooltip and data label templates do not bind directly to your business model because these elements are generated by the chart at runtime and often represent calculated points. As a result, the chart provides its own binding context containing the necessary metadata. For tooltips this context is [TooltipInfo](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Charts.TooltipInfo.html), and for data labels it is [ChartDataLabel](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.Charts.ChartDataLabel.html). Both expose an Item property that points back to your original business model when a direct mapping exists. With .NET 9 compiled bindings, set **x:DataType="chart:TooltipInfo"** for tooltip templates and **x:DataType="chart:ChartDataLabel"** for data label templates, then bind through Item. If you need a specific field from your model, bind to Item and use a value converter to extract the desired property.

`Ahead-of-Time (AOT)` compilation converts Intermediate Language to native code at build time to improve startup and runtime performance. AOT commonly ships together with linker trimming in Release configurations to reduce app size.

Because Release builds enable trimming, members referenced only from XAML can be removed unless explicitly preserved. To ensure your bindings work in Release, reference your value converter from XAML and preserve your ViewModel, business model, and converter types. This prevents the linker from removing properties that your tooltip or data label templates access through Item.

{% tabs %}

{% highlight xaml %}

<chart:SfCartesianChart>
<chart:SfCartesianChart.Resources>
<local:ValueConverter x:Key="valueConverter" />

<DataTemplate x:Key="tooltiptemplate">
<StackLayout x:DataType="chart:TooltipInfo" Orientation="Vertical">
<Label Text="{Binding Item, Converter={StaticResource valueConverter},
ConverterParameter=Planned,
StringFormat='Planned : {0}h'}"
TextColor="White" />
</StackLayout>
</DataTemplate>

<DataTemplate x:Key="labelTemplate">
<StackLayout x:DataType="chart:ChartDataLabel" Orientation="Vertical">
<Label Text="{Binding Item, Converter={StaticResource valueConverter},
ConverterParameter=Planned,
StringFormat='Label : {0}h'}"
TextColor="Black" />
</StackLayout>
</DataTemplate>
</chart:SfCartesianChart.Resources>

<chart:SplineAreaSeries x:Name="series"
ItemsSource="{Binding ChartData}"
XBindingPath="WeekNumber"
YBindingPath="Planned"
EnableTooltip="True"
ShowDataLabels="True"
LabelTemplate="{StaticResource labelTemplate}"
TooltipTemplate="{StaticResource tooltiptemplate}">
</chart:SplineAreaSeries>

</chart:SfCartesianChart>

{% endhighlight %}


{% highlight C# %}

public class ValueConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
return value is WeekPlan weekPlan ? weekPlan.Planned : value;
}

public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) => value;
}

{% endhighlight %}

{% endtabs %}

## See also

[Why Tooltip and DataLabel Are Missing in Release Mode .NET MAUI Chart?](https://support.syncfusion.com/kb/article/21677/why-tooltip-and-datalabel-are-not-showing-in-release-mode-in-net-maui-sfcartesianchart)
19 changes: 9 additions & 10 deletions maui-toolkit/Spark-Charts/customize-datapoints.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: post
title: Customize Data Points in .NET MAUI Spark Chart Control | Syncfusion
description: Learn here all about how to customize data points in Syncfusion .NET MAUI Spark Charts (SfSparkChart) control and more.
description: Learn here all about how to customize data points in Syncfusion® .NET MAUI Spark Charts (SfSparkChart) control and more.
platform: maui-toolkit
control: SfSparkChart
documentation: ug
Expand All @@ -15,11 +15,11 @@ Customizing data point colors improves visual clarity by distinguishing key valu

Color of the first, last, high, low, and negative data points can be customized using the following `Brush` type properties.

* `FirstPointFill` - Used to highlight the first point.
* `LastPointFill` - Used to highlight the last point.
* `HighPointFill` - Used to highlight the highest point.
* `LowPointFill` - Used to highlight the lowest point.
* `NegativePointsFill` - Used to highlight the negative points.
* [FirstPointFill](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.SparkCharts.SfSparkLineChart.html#Syncfusion_Maui_Toolkit_SparkCharts_SfSparkLineChart_FirstPointFill) - Used to highlight the first point.
* [LastPointFill](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.SparkCharts.SfSparkLineChart.html#Syncfusion_Maui_Toolkit_SparkCharts_SfSparkLineChart_LastPointFill) - Used to highlight the last point.
* [HighPointFill](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.SparkCharts.SfSparkLineChart.html#Syncfusion_Maui_Toolkit_SparkCharts_SfSparkLineChart_HighPointFill) - Used to highlight the highest point.
* [LowPointFill](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.SparkCharts.SfSparkLineChart.html#Syncfusion_Maui_Toolkit_SparkCharts_SfSparkLineChart_LastPointFill) - Used to highlight the lowest point.
* [NegativePointsFill](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.SparkCharts.SfSparkLineChart.html#Syncfusion_Maui_Toolkit_SparkCharts_SfSparkLineChart_NegativePointsFill) - Used to highlight the negative points.

{% tabs %}

Expand Down Expand Up @@ -55,7 +55,7 @@ this.Content = sparkchart;

{% endtabs %}

N> `NegativePointsFill` is applicable for `SfSparkColumnChart` and `SfSparkWinLossChart` alone.
N> [NegativePointsFill](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.SparkCharts.SfSparkLineChart.html#Syncfusion_Maui_Toolkit_SparkCharts_SfSparkLineChart_NegativePointsFill) is applicable for [SfSparkColumnChart](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.SparkCharts.SfSparkColumnChart.html) and [SfSparkWinLossChart](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.SparkCharts.SfSparkWinLossChart.html) alone.

![Customized data points in MAUI Spark Line Chart](customize_datapoints_images/MAUI_Line_segments.png)

Expand Down Expand Up @@ -99,7 +99,7 @@ this.Content = sparkchart;

## Padding

The `Padding` property represents the distance between an element and its child elements. Padding can be applied in specific direction or in all directions. Padding can be applied for all sparkline types.
The [Padding](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.SparkCharts.SfSparkChart.html#Syncfusion_Maui_Toolkit_SparkCharts_SfSparkChart_Padding) property represents the distance between an element and its child elements. Padding can be applied in specific direction or in all directions. Padding can be applied for all sparkline types.

{% tabs %}

Expand Down Expand Up @@ -152,5 +152,4 @@ this.Content = sparkchart;

{% endtabs %}

![Spark Line Chart Without Padding](customize_datapoints_images/MAUI_Line_Sparkline_without_padding.png)
![Spark Line Chart With Padding](customize_datapoints_images/MAUI_Line_Sparkline_with_padding.png)
![Spark Line Chart With Padding](customize_datapoints_images/MAUI_Line_Sparkline_with_padding.png)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
10 changes: 5 additions & 5 deletions maui-toolkit/Spark-Charts/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ using Syncfusion.Maui.Toolkit.Hosting;
## Step 4: Add .NET MAUI Spark Charts

1. To initialize the control, import the `Syncfusion.Maui.Toolkit.SparkCharts` namespace into your code.
2. Initialize an instance of the `SfSparkLineChart` control.
2. Initialize an instance of the [SfSparkLineChart](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.SparkCharts.SfSparkLineChart.html) control.

{% tabs %}
{% highlight xaml %}
Expand Down Expand Up @@ -160,7 +160,7 @@ using Syncfusion.Maui.Toolkit.Hosting;
## Step 4: Add .NET MAUI Spark Charts

1. To initialize the control, import the `Syncfusion.Maui.Toolkit.SparkCharts` namespace.
2. Initialize `SfSparkLineChart`.
2. Initialize [SfSparkLineChart](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.SparkCharts.SfSparkLineChart.html).

{% tabs %}
{% highlight xaml %}
Expand Down Expand Up @@ -251,7 +251,7 @@ using Syncfusion.Maui.Toolkit.Hosting;
## Step 4: Add .NET MAUI Spark Charts

1. To initialize the control, import the `Syncfusion.Maui.Toolkit.SparkCharts` namespace.
2. Initialize `SfSparkLineChart`.
2. Initialize [SfSparkLineChart](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.SparkCharts.SfSparkLineChart.html).

{% tabs %}
{% highlight xaml %}
Expand Down Expand Up @@ -372,7 +372,7 @@ sparkchart.BindingContext = viewModel;

### Populate chart with data

Binding `Data` to the spark chart `ItemsSource` property from its BindingContext to create our own spark chart.
Binding `Data` to the spark chart [ItemsSource](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.SparkCharts.SfSparkChart.html#Syncfusion_Maui_Toolkit_SparkCharts_SfSparkChart_ItemsSource) property from its BindingContext to create our own spark chart.

{% tabs %}

Expand Down Expand Up @@ -453,4 +453,4 @@ The following spark chart is created as a result of the previous codes.

![Spark Line Chart in MAUI Spark Chart](getting_started_images/MAUI_Spark_Chart.png)

You can find the complete getting started sample from this [link](https://github.com/SyncfusionExamples/maui-toolkit-samples/tree/master/SparkChart/GettingStarted).
You can find the complete getting started sample from this [link](https://github.com/SyncfusionExamples/maui-toolkit-samples/tree/master/SparkChart/GettingStarted).
20 changes: 10 additions & 10 deletions maui-toolkit/Spark-Charts/markers.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
---
layout: post
title: Markers in .NET MAUI Spark Chart Control | Syncfusion
description: Learn here all about the markers supported in Syncfusion .NET MAUI Spark Charts (SfSparkChart) control and more.
description: Learn here all about the markers supported in Syncfusion® .NET MAUI Spark Charts (SfSparkChart) control and more.
platform: maui-toolkit
control: SfSparkChart
documentation: ug
---

# Markers in .NET MAUI Spark Charts

Markers, also known as symbols, are used to indicate or highlight the position of data points in the `SfSparkLineChart` and `SfSparkAreaChart`.
Markers, also known as symbols, are used to indicate or highlight the position of data points in the [SfSparkLineChart](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.SparkCharts.SfSparkLineChart.html) and [SfSparkAreaChart](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.SparkCharts.SfSparkAreaChart.html).

## Enable Marker

To enable markers in the `SfSparkLineChart` and `SfSparkAreaChart`, set the `ShowMarkers` property to `true`. Its default value is `false`.
To enable markers in the [SfSparkLineChart](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.SparkCharts.SfSparkLineChart.html) and [SfSparkAreaChart](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.SparkCharts.SfSparkAreaChart.html), set the [ShowMarkers](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.SparkCharts.SfSparkLineChart.html#Syncfusion_Maui_Toolkit_SparkCharts_SfSparkLineChart_ShowMarkers) property to `true`. Its default value is `false`.

{% tabs %}

Expand Down Expand Up @@ -46,14 +46,14 @@ this.Content = sparkchart;

## Marker Customization

To change the appearance of markers in the `SfSparkLineChart` and `SfSparkAreaChart`, create an instance of the `MarkerSettings` property. The following properties can be used to customize the marker's appearance.
To change the appearance of markers in the [SfSparkLineChart](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.SparkCharts.SfSparkLineChart.html) and [SfSparkAreaChart](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.SparkCharts.SfSparkAreaChart.html), create an instance of the [MarkerSettings](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.SparkCharts.SfSparkLineChart.html#Syncfusion_Maui_Toolkit_SparkCharts_SfSparkLineChart_MarkerSettings) property. The following properties can be used to customize the marker's appearance.

* `ShapeType`, of type `SparkChartMarkerShape`, describes the shape of the marker. The default value of this property is `SparkChartMarkerShape.Circle`.
* `Stroke`, of type `Brush`, indicates the brush used to paint the marker border.
* `StrokeWidth`, of type `double`, indicates the width of the marker border.
* `Fill`, of type `Brush`, indicates the color of the marker.
* `Width`, of type `double`, indicates the width of the marker.
* `Height`, of type `double`, indicates the height of the marker.
* [ShapeType](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.SparkCharts.SparkChartMarkerSettings.html#Syncfusion_Maui_Toolkit_SparkCharts_SparkChartMarkerSettings_ShapeType), of type [SparkChartMarkerShape](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.SparkCharts.SparkChartMarkerShape.html), describes the shape of the marker. The default value of this property is [SparkChartMarkerShape.Circle](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.SparkCharts.SparkChartMarkerShape.html#Syncfusion_Maui_Toolkit_SparkCharts_SparkChartMarkerShape_Circle).
* [Stroke](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.SparkCharts.SparkChartMarkerSettings.html#Syncfusion_Maui_Toolkit_SparkCharts_SparkChartMarkerSettings_Stroke), of type `Brush`, indicates the brush used to paint the marker border.
* [StrokeWidth](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.SparkCharts.SparkChartMarkerSettings.html#Syncfusion_Maui_Toolkit_SparkCharts_SparkChartMarkerSettings_StrokeWidth), of type `double`, indicates the width of the marker border.
* [Fill](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.SparkCharts.SparkChartMarkerSettings.html#Syncfusion_Maui_Toolkit_SparkCharts_SparkChartMarkerSettings_Fill), of type `Brush`, indicates the color of the marker.
* [Width](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.SparkCharts.SparkChartMarkerSettings.html#Syncfusion_Maui_Toolkit_SparkCharts_SparkChartMarkerSettings_Width), of type `double`, indicates the width of the marker.
* [Height](https://help.syncfusion.com/cr/maui-toolkit/Syncfusion.Maui.Toolkit.SparkCharts.SparkChartMarkerSettings.html#Syncfusion_Maui_Toolkit_SparkCharts_SparkChartMarkerSettings_Height), of type `double`, indicates the height of the marker.

{% tabs %}

Expand Down
Loading