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

How to create half donut chart with bigger view?

2 Answers 721 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
kangroo
Top achievements
Rank 1
kangroo asked on 17 Feb 2018, 07:52 AM

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 Answers, 1 is accepted

Sort by
0
kangroo
Top achievements
Rank 1
answered on 18 Feb 2018, 11:06 AM

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
                );
        }
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 19 Feb 2018, 09:38 AM
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.
Tags
ChartView
Asked by
kangroo
Top achievements
Rank 1
Answers by
kangroo
Top achievements
Rank 1
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or