Size of Donut

2 posts, 0 answers
  1. Martin
    Martin avatar
    7 posts
    Member since:
    Dec 2017

    Posted 05 Dec 2017 Link to this post


    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[0].ForeColor = Color.White;
    this.chartView.Series[0].Font = new Font("Arial", 12, FontStyle.Bold);



  2. Dimitar
    Dimitar avatar
    2960 posts

    Posted 07 Dec 2017 Link to this post

    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.

    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.
Back to Top