How can I help you?
Liquid Glass Effect in .NET MAUI Cartesian Chart
16 Dec 20256 minutes to read
The Liquid Glass Effect is a modern design style that provides a sleek, minimalist appearance with clean lines, subtle visual effects, and elegant styling. It features smooth rounded corners and sophisticated visual treatments that create a polished, professional look for your charts.
NOTE
The liquid glass effect is supported only on
.NET 10and oniOSandmacOSversions 26 or later
How it Enhances Chart UI on macOS and iOS
The Liquid Glass Effect enhances MAUI SfCartesianChart with a sleek, glassy look and improved interactivity.
- Tooltip: Applies a glassy appearance to tooltips for clearer data highlights.
- Trackball: Adds a glassy style to trackball labels for precise value inspection.
- Chart Background: Wrap the chart in an SfGlassEffectView to give the chart surface a blurred or clear glass background.
Apply Liquid Glass Effect to SfCartesianChart Background
Wrap the SfCartesianChart inside an SfGlassEffectView to give the chart surface a glass (blurred or clear) appearance. SfGlassEffectView is available in the Syncfusion.Maui.Core package.
<core:SfGlassEffectView CornerRadius="20"
Padding="12"
EffectType="Regular"
EnableShadowEffect="True">
<chart:SfCartesianChart>
<chart:SfCartesianChart.XAxes>
<chart:CategoryAxis />
</chart:SfCartesianChart.XAxes>
<chart:SfCartesianChart.YAxes>
<chart:NumericalAxis />
</chart:SfCartesianChart.YAxes>
<chart:ColumnSeries
ItemsSource="{Binding Data}"
XBindingPath="Category"
YBindingPath="Value" />
</chart:SfCartesianChart>
</core:SfGlassEffectView>SfCartesianChart chart = new SfCartesianChart();
chart.XAxes.Add(new CategoryAxis());
chart.YAxes.Add(new NumericalAxis());
chart.Series.Add(new ColumnSeries
{
ItemsSource = viewModel.Data,
XBindingPath = "Category",
YBindingPath = "Value"
});
var glass = new SfGlassEffectView
{
CornerRadius = 20,
Padding = 12,
EffectType = GlassEffectType.Regular, // Regular (blurrier) or Clear (glassy)
EnableShadowEffect = true,
Content = chart
};For detailed guidance on SfGlassEffectView, refer to the Getting Started documentation.
Enable Liquid Glass Effect to SfCartesianChart Elements
Tooltip
To Enable Liquid Glass effect to the tooltip, set True to EnableLiquidGlassEffect property of SfCartesianChart and EnableTooltip property of ChartSeries.
<chart:SfCartesianChart EnableLiquidGlassEffect="True">
. . .
<chart:ColumnSeries ItemsSource="{Binding Data}"
XBindingPath="Category"
YBindingPath="Value"
EnableTooltip="True">
</chart:ColumnSeries>
</chart:SfCartesianChart>SfCartesianChart chart = new SfCartesianChart();
chart.EnableLiquidGlassEffect = true;
. . .
ColumnSeries series = new ColumnSeries()
{
ItemsSource = viewModel.Data,
XBindingPath = "Category",
YBindingPath = "Value",
EnableTooltip = true
};
chart.Series.Add(series);
this.Content = chart;
Trackball
To Enable Liquid Glass effect to the trackball, set True to EnableLiquidGlassEffect property of SfCartesianChart and ShowTrackballLabel property of ChartSeries.
<chart:SfCartesianChart EnableLiquidGlassEffect="True">
. . .
<chart:LineSeries ItemsSource="{Binding Data}"
XBindingPath="Category"
YBindingPath="Value"
ShowTrackballLabel="True">
</chart:LineSeries>
</chart:SfCartesianChart>SfCartesianChart chart = new SfCartesianChart();
chart.EnableLiquidGlassEffect = true;
. . .
LineSeries series = new LineSeries()
{
ItemsSource = viewModel.Data,
XBindingPath = "Category",
YBindingPath = "Value",
ShowTrackballLabel = true
};
chart.Series.Add(series);
this.Content = chart;
Best Practices and Tips
- Host the chart inside an SfGlassEffectView to give the chart body a glass appearance.
- Liquid glass effects are most visible over images or colorful backgrounds.
- Set EffectType property of SfGlassEffectView as
Regularfor a blurrier look andClearfor a crisper, glassy look. - Tune CornerRadius and Padding to balance content density and visual polish.
- When using a custom template for tooltip and trackball using TooltipTemplate and TrackballLabelTemplate, set the background to
Transparentto display the liquid glass effect.