Skip to content

Conversation

@github-actions
Copy link

@github-actions github-actions bot commented Nov 8, 2025

No description provided.

@github-actions github-actions bot requested a review from a team as a code owner November 8, 2025 13:17
@@ -0,0 +1,164 @@
---
title: Adjusting Spacing Between Legend Icon and Text in Telerik UI for .NET MAUI Pie Chart
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
title: Adjusting Spacing Between Legend Icon and Text in Telerik UI for .NET MAUI Pie Chart
title: Adjusting the Spacing Between Legend Icon and Text in Telerik UI for .NET MAUI Pie Chart

This knowledge base article also answers the following questions:

- How to customize the legend layout in Telerik UI for .NET MAUI Chart?
- How to use CollectionView for controlling legend spacing in Charts?
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- How to use CollectionView for controlling legend spacing in Charts?
- How to use `CollectionView` for controlling the legend spacing in Charts?


- How to customize the legend layout in Telerik UI for .NET MAUI Chart?
- How to use CollectionView for controlling legend spacing in Charts?
- How to adjust legend appearance in .NET MAUI Chart?
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- How to adjust legend appearance in .NET MAUI Chart?
- How to adjust the legend appearance in .NET MAUI Chart?


## Solution

To control the spacing between the legend icon and text, use the Telerik MAUI CollectionView and define a custom layout for the legend. Follow these steps:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
To control the spacing between the legend icon and text, use the Telerik MAUI CollectionView and define a custom layout for the legend. Follow these steps:
To control the spacing between the legend icon and text, use the Telerik UI for .NET MAUI `CollectionView` and define a custom layout for the legend. Follow these steps:

2. Define a custom `ItemTemplate` in the `RadCollectionView`.
3. Use a `HorizontalStackLayout` with the `Spacing` property to control the distance between the legend icon and text.

```xaml
Copy link
Contributor

Choose a reason for hiding this comment

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

The entire code block needs to be indented.


4. Bind the legend items to the `RadCollectionView` in the code-behind.

```csharp
Copy link
Contributor

Choose a reason for hiding this comment

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

The code block needs to be indented.

}
```

5. Add a sample `ViewModel`, `DataItem` and `LegendItem`:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
5. Add a sample `ViewModel`, `DataItem` and `LegendItem`:
5. Add a sample `ViewModel`, `DataItem` and `LegendItem`.


5. Add a sample `ViewModel`, `DataItem` and `LegendItem`:

```csharp
Copy link
Contributor

Choose a reason for hiding this comment

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

Indent the code block.

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.

2 participants