Skip to content

Commit 58b4bef

Browse files
authored
Merge pull request #701 from telerik/new-kb-chartview-reduce-space-around-d8c2f2ec3fe445d1b8894c6ae995004c
Added new kb article chartview-reduce-space-around
2 parents 165fcf2 + 4ab655e commit 58b4bef

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
title: Reducing Space Around RadChartView in WinForms
3+
description: Learn how to minimize the unused space around the RadChartView to make the chart appear larger within a WinForms application.
4+
type: how-to
5+
page_title: How to Adjust Margins for RadChartView in WinForms for a Larger Chart Display
6+
slug: reduce-space-radchartview-winforms
7+
tags: chartview, winforms, chart, margin, padding
8+
res_type: kb
9+
ticketid: 1681296
10+
---
11+
12+
## Environment
13+
14+
|Product Version|Product|Author|
15+
|----|----|----|
16+
|2025.1.211|RadChartView for WinForms|[Dinko Krastev](https://www.telerik.com/blogs/author/dinko-krastev)|
17+
18+
## Description
19+
20+
Reducing the space around the RadChartView to make the chart appear larger is a common requirement.
21+
22+
## Solution
23+
24+
To reduce the space around the `RadChartView`, adjust the margin of the view. Set the margin using the `Padding` class to specify the amount of space you want around your chart. Here's how you can achieve this:
25+
26+
````C#
27+
radChartView1.View.Margin = new Padding(2, 2, 2, 2);
28+
````
29+
30+
This code sets the margin to 2 pixels on all sides (left, top, right, bottom), making the chart area larger by reducing the unused space around it.
31+
32+
## See Also
33+
34+
- [RadChartView Overview](https://docs.telerik.com/devtools/winforms/controls/chartview/overview)
35+
- [Customizing Appearance](https://docs.telerik.com/devtools/winforms/controls/chartview/customization/customizing-appearance)

0 commit comments

Comments
 (0)