Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Added new kb article center-align-legend-text-telerik-reporting #1652

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
48 changes: 48 additions & 0 deletions knowledge-base/center-align-legend-text-telerik-reporting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
title: Center Aligning Legend Text in Telerik Reporting Graph
description: Learn how to center align the legend text for a graph component in Telerik Reporting.
type: how-to
page_title: How to Center Align Legend Text in Graphs with Telerik Reporting
slug: center-align-legend-text-telerik-reporting
tags: reporting, graph, legend, text alignment, center align
res_type: kb
ticketid: 1682367
---

## Description
When designing reports, aligning chart legends and text correctly is crucial for readability and aesthetics. This knowledge-based article explains how to adjust the legend text alignment in a graph within Telerik Reporting. Also answers the following questions:
- How do I center align legend text in Telerik Reporting?
- What property adjusts the legend text alignment in a graph?
- How can I ensure my graph's legend text is properly centered?

## Environment
<table>
<tbody>
<tr>
<td>Product</td>
<td>Progress® Telerik® Reporting</td>
</tr>
<tr>
<td>Version</td>
<td>18.1.24.709</td>
</tr>
</tbody>
</table>

## Solution
To center align the legend text in a graph component, follow these steps:

1. Select the graph in your report.
2. Navigate to the `Series` collection of the graph.
3. Choose the series for which you want to adjust the legend text alignment.
4. From the `LegendItem` dropdown, select the `MarkStyle` property.
5. Adjust the `VerticalAlign` property within `MarkStyle` to set the alignment box to the middle, aligning the legend text center with respect to the legend box.

This approach ensures that the legend text is centered, improving the visual appeal and legibility of your reports.

![How to center align legend text](images/centerAlignLegendText.png)

## See Also
* [Graph Product Documentation]({%slug telerikreporting/designing-reports/report-structure/graph/overview%})
* [Styling the Graph]({%slug add-pattern-styles-graph-column-stack-bars-telerik-reporting%})
* [Report Items Overview]({%slug telerikreporting/designing-reports/report-structure/overview%})
Binary file added knowledge-base/images/centerAlignLegendText.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.