Winforms, pie in radchartview

1 Answer 55 Views
Forum suggestions
Christian
Top achievements
Rank 1
Christian asked on 02 Mar 2023, 08:10 PM

Hello, 

I'm using RadChartView for the first time. 

I need to know how to remove the blank space (top and bottom) in a radchartview wich has a pie.

VB:

Dim rad As RadChartView = New RadChartView()
rad.Size = New Size(600,600)
rad.AreaType = ChartAreaType.Pie
Dim pie = New PieSeries()
pie.ValueMember = tabla.Columns(0).ColumnName
pie.DisplayMember = tabla.Columns(1).ColumnName
pie.DataSource = tabla'a DataTable
pie.Padding = New Padding(2)           
rad.View.Margin = New Padding(2)
rad.View.Padding = New Padding(2)
rad.ShowLegend = True  
rad.Series.Add(pie)

panel.Controls.Add(rad)

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 03 Mar 2023, 05:29 AM

Hello, Christian,

RadChartView has 40 px margin by default. You can eliminate it to obtain more space for the chart: 

 Me.RadChartView1.View.Margin = New Padding(0)

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Christian
Top achievements
Rank 1
commented on 03 Mar 2023, 12:28 PM

Hi Dess, 

I've already tried with rad.View.Margin = New Padding(2) and did not work


Dess | Tech Support Engineer, Principal
Telerik team
commented on 07 Mar 2023, 03:46 PM

Hi, Christian,

I have attached my sample project for your reference. Please give it a try and see how it works on your end.

Before:

After:

Tags
Forum suggestions
Asked by
Christian
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or