How to create half donut chart with bigger view?

3 posts, 0 answers
  1. kangroo
    kangroo avatar
    4 posts
    Member since:
    Jul 2017

    Posted 17 Feb 2018 Link to this post

    hello everyone.i am trying create a half donut chart in my project.it has small area to dock as fill.

    my problem is when i create a half donut rad chartview that view become so small.

    it is look like this picture 1.There is many empty white area being and view size of charview is too much small.

    but i want to make it view like at picture 2.

    is that possible to create a half donut charview with bigger view size?if it is , how i can do that?I have already try change margin padding as 1px.

    (this code: chart_PrimUretimi.Margin = new System.Windows.Forms.Padding(1); ) that doesn't help.

  2. kangroo
    kangroo avatar
    4 posts
    Member since:
    Jul 2017

    Posted 18 Feb 2018 Link to this post

    okay i just figure out how to do that.
    first: my first code was wrong.i mean it should be like: chart_PrimUretimi.View.Margin = new System.Windows.Forms.Padding(1);

    then i checked owerloads of this code.I just realised i can give different margins for every single sides.But when i use that one in form1.Designer.cs thats works only at first load.And it doesn't looks good when form size changed.I just wrote this codes in form1 sizechanged event and its worked well.I hope this helps someone else too.

    private void form1_SizeChanged(object sender, EventArgs e)
            {
                this.chart_PrimUretimi.View.Margin = new System.Windows.Forms.Padding
                    (
                    (this.chart_PrimUretimi.Size.Width / 30) * -1,
                    this.chart_PrimUretimi.Size.Height / 50,
                    (this.chart_PrimUretimi.Size.Width / 30) * -1,
                    (this.chart_PrimUretimi.Size.Height - 50) * -1
                    );
            }
  3. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3988 posts

    Posted 19 Feb 2018 Link to this post

    Hello, Kangroo, 

    Thank you for writing.  

    I am glad that you have found a suitable solution for your case. However, I would like to note that it may be appropriate to use RadRadialGauge with several arcs. In order to get familiar with the gauges you can refer to the following help articles:
    https://docs.telerik.com/devtools/winforms/gauges/radialgauge/radialgauge
    https://docs.telerik.com/devtools/winforms/gauges/radialgauge/structure
    https://docs.telerik.com/devtools/winforms/gauges/radialgauge/understanding-gauge-elements/working-with-arcs

    I hope this information helps. Should you have further questions I would be glad to help. 
     
     Regards,
    Dess
    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