Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
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
Empty file added MAUI/Release-notes/v30.1.37.md
Empty file.
147 changes: 147 additions & 0 deletions MAUI/SunburstChart/DrillDown.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
---
layout: post
title: Drill down in .NET MAUI Sunburst Chart control | Syncfusion
description: This section explains how to enable and customize drill down toolbar in the Syncfusion<sup>®</sup> .NET MAUI Sunburst Chart control.
platform: maui
control: SfSunburstChart
documentation: ug
---

# Drill Down in .NET MAUI Sunburst Chart

The drill-down provides better visualization of hierarchy. Large set of data can be virtualized into minimal views. Each level of the segments can be drilled down. The Sunburst Chart provides animation along with the drill-down support. Double tapping the segment performs the drill-down operation. Toolbar will be enabled on drill-down that helps in performing zoom back and reset operations.

To enable this feature, set the `EnableDrillDown` property to true in [SfSunburstChart](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.SunburstChart.SfSunburstChart.html).

{% tabs %}

{% highlight xaml %}

<sunburst:SfSunburstChart EnableDrillDown="True" >
. . .
</sunburst:SfSunburstChart>

{% endhighlight %}

{% highlight c# %}

SfSunburstChart sunburst = new SfSunburstChart();
sunburst.EnableDrillDown = true;
. . .
this.Content = sunburst;

{% endhighlight %}

{% endtabs %}

## Toolbar Alignment

The vertical and the horizontal alignments of the toolbar can be customized using the `VerticalAlignment` and `HorizontalAlignment` properties, respectively.

Both the alignment properties has the following enum types:

* Start: Aligns the toolbar to the top (for vertical) or left (for horizontal) of the chart plot area.
* Center: Aligns the toolbar to the center of the chart plot area, either vertically or horizontally.
* End: Aligns the toolbar to the bottom (for vertical) or right (for horizontal) of the chart plot area.

{% tabs %}

{% highlight xaml %}

<sunburst:SfSunburstChart EnableDrillDown="True">
. . .
<chart:SfSunburstChart.ToolbarSettings>
<chart:SunburstDrillDownToolbarSettings HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</chart:SfSunburstChart.ToolbarSettings>
</sunburst:SfSunburstChart>

{% endhighlight %}

{% highlight c# %}

SfSunburstChart sunburst = new SfSunburstChart();
sunburst.EnableDrillDown = true;
. . .
SunburstDrillDownToolbarSettings toolbarSettings = new SunburstDrillDownToolbarSettings()
{
HorizontalAlignment = SunburstToolbarAlignment.Center,
VerticalAlignment = SunburstToolbarAlignment.Center,
};
sunburst.ToolbarSettings = toolbarSettings;
this.Content = sunburst;

{% endhighlight %}

{% endtabs %}

## Toolbar Positioning

The toolbar's position within the Sunburst Chart can be adjusted both horizontally and vertically using the `OffsetX` and `OffsetY` properties of the `SunburstToolbarSettings` class.

{% tabs %}

{% highlight xaml %}

<sunburst:SfSunburstChart EnableDrillDown="True">
. . .
<chart:SfSunburstChart.ToolbarSettings >
<chart:SunburstDrillDownToolbarSettings OffsetX="50" OffsetY="100"/>
</chart:SfSunburstChart.ToolbarSettings>
</sunburst:SfSunburstChart>

{% endhighlight %}

{% highlight c# %}

SfSunburstChart sunburst = new SfSunburstChart();
sunburst.EnableDrillDown = true;
. . .
SunburstDrillDownToolbarSettings toolbarSettings = new SunburstDrillDownToolbarSettings()
{
OffsetX = 50,
OffsetY = 100,
};
sunburst.ToolbarSettings = toolbarSettings;
this.Content = sunburst;

{% endhighlight %}

{% endtabs %}

## Toolbar Customization

The appearance of the drill-down toolbar in the Sunburst Chart can be customized using the following properties

* `IconBrush`: Gets or sets the brush used to style the icons within the drill-down toolbar.
* `Background`: Gets or sets the background brush of the drill-down toolbar.

{% tabs %}

{% highlight xaml %}

<sunburst:SfSunburstChart EnableDrillDown="True">
. . .
<chart:SfSunburstChart.ToolbarSettings>
<chart:SunburstDrillDownToolbarSettings IconBrush="White" Background="#2989F9"/>
</chart:SfSunburstChart.ToolbarSettings>
</sunburst:SfSunburstChart>

{% endhighlight %}

{% highlight c# %}

SfSunburstChart sunburst = new SfSunburstChart();
sunburst.EnableDrillDown = true;
. . .
SunburstDrillDownToolbarSettings toolbarSettings = new SunburstDrillDownToolbarSettings()
{
IconBrush = Colors.White,
ackground = new SolidColorBrush(Color.FromArgb("#2989F9")),
};
sunburst.ToolbarSettings = toolbarSettings;
this.Content = sunburst;

{% endhighlight %}

{% endtabs %}
1 change: 1 addition & 0 deletions maui-toc.html
Original file line number Diff line number Diff line change
Expand Up @@ -1297,6 +1297,7 @@
<li><a href="/maui/SunburstChart/Appearance">Appearance</a></li>
<li><a href="/maui/SunburstChart/DataLabels">Data Label</a></li>
<li><a href="/maui/SunburstChart/Tooltip">Tooltip</a></li>
<li><a href="/maui/SunburstChart/drillDown">Drill Down</a></li>
<li><a href="/maui/SunburstChart/CenterView">Center View</a></li>
</ul>
</li>
Expand Down