This is a migrated thread and some comments may be shown as answers.

Size of Donut

1 Answer 26 Views
This is a migrated thread and some comments may be shown as answers.
Martin
Top achievements
Rank 1
Martin asked on 05 Dec 2017, 09:58 AM

Hello,

I hope this is a simple question. But how can I give a donut graph another size?

Because resizing the client area at designtime doesn't change the size of the donut.
Also not changing the Size property by hand.

Below is the code that I have. What do I miss?

 

this.chartView.AreaType = ChartAreaType.Pie;
DonutSeries series = new DonutSeries();
series.DataPoints.Add(new PieDataPoint(50, "Germany"));
series.DataPoints.Add(new PieDataPoint(70, "United States"));
series.DataPoints.Add(new PieDataPoint(40, "France"));
series.DataPoints.Add(new PieDataPoint(25, "United Kingdom"));
series.ShowLabels = true;
series.Size = new Size(400, 400); //***
this.chartView.Series.Add(series);
this.chartView.Series[0].ForeColor = Color.White;
this.chartView.Series[0].Font = new Font("Arial", 12, FontStyle.Bold);

 

 

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 07 Dec 2017, 07:58 AM
Hello Martin,

By default, all charts fill the available space considering the view margin (which is 40 on all sides by default). So to increase the size of the donut you can remove that margin:
radChartView1.View.Margin = new Padding(0);

Should you have any other questions do not hesitate to ask.

Regards,
Dimitar
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Asked by
Martin
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or