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

How to fix Size Piece of Doughnut?

5 Answers 101 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Watit
Top achievements
Rank 2
Watit asked on 12 Mar 2012, 07:29 AM

I have test by simple code
http://dl.dropbox.com/u/50999266/Copy_of_317544_DoghnutChart.rar

            sampleData.Add(new DashboardChart("AGRO", 1, -1.5));
            sampleData.Add(new DashboardChart("CONSUMP", 1, 0.5));
            sampleData.Add(new DashboardChart("FINCIAL", 2, 1.2));
            sampleData.Add(new DashboardChart("INDUS", 2, 0.1));
            sampleData.Add(new DashboardChart("PROPCON", 3, -1.1));
            sampleData.Add(new DashboardChart("RESOURC", 3, 1.4));
            sampleData.Add(new DashboardChart("SERVICE", 4, 0.38));
            sampleData.Add(new DashboardChart("TECH", 4, -0.23));

If value of Price has less as (-) or same value  as 1.4, 1.5 
the dought has same position or same my attach picture

Please help to some solution to fix size of piece 
if value as 12.5 i think the postion is OK

    sampleData.Add(new DashboardChart("AGRO", 1, 12.5));
            sampleData.Add(new DashboardChart("CONSUMP", 1, 12.5));
            sampleData.Add(new DashboardChart("FINCIAL", 2, 12.5));
            sampleData.Add(new DashboardChart("INDUS", 2, 12.5));
            sampleData.Add(new DashboardChart("PROPCON", 3, 12.5));
            sampleData.Add(new DashboardChart("RESOURC", 3, 12.5));
            sampleData.Add(new DashboardChart("SERVICE", 4, 12.5));
            sampleData.Add(new DashboardChart("TECH", 4, 12.5)); 

5 Answers, 1 is accepted

Sort by
0
Watit
Top achievements
Rank 2
answered on 12 Mar 2012, 10:28 AM
I'm only Increase Parameter  Everything it's OK ^^


sampleData.Add(new DashboardChart("AGRO", 5, -1.0, 12.5));
sampleData.Add(new DashboardChart("CONSUMP", 6, 0, 12.5));
sampleData.Add(new DashboardChart("FINCIAL", 8, 2.02, 12.5));
sampleData.Add(new DashboardChart("INDUS", 7, 1.06, 12.5));
sampleData.Add(new DashboardChart("PROPCON", 8, 2.01, 12.5));
sampleData.Add(new DashboardChart("RESOURC", 4, -1.20, 12.5));
sampleData.Add(new DashboardChart("SERVICE", 5, -0.29, 12.5));
sampleData.Add(new DashboardChart("TECH", 3, -2.1, 12.5));
 
//And
 
m.ItemMappings.Add(new ItemMapping("Fixsize", DataPointMember.YValue));
m.ItemMappings.Add(new ItemMapping("Name", DataPointMember.XCategory));
m.SeriesDefinition.ItemLabelFormat = "#XCAT\n#DATAITEM.PercentChange%";
 
//Increase Parameter
 
public class DashboardChart
    {
        public string Name { get; set; }
        public int ID { get; set; }
        public double Fixsize { get; set; }
        public double PercentChange { get; set; }
 
        public DashboardChart(string name, int id, double percentChange, double fixsize)
        {
            Name = name;
            ID = id;
            Fixsize = fixsize;
            PercentChange = percentChange;
             
        }
    }
0
Nikolay
Telerik team
answered on 14 Mar 2012, 09:03 AM
Hello Watit,

It appears that the issue you've encountered is caused by setting negative values for slices of the Doughnut chart, which is not supported by the control. If this is not the case and you continue experiencing the problematic behavior it would be very helpful for us if you're able to open a support ticket and send us a sample application demonstrating the issue,so that we can debug it locally and provide a solution.

Kind regards,
Nikolay
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Watit
Top achievements
Rank 2
answered on 19 Mar 2012, 03:05 AM
This my test project.
You can Download Link bellow here
http://dl.dropbox.com/u/50999266/317544_DoghnutChart-20120312.rar
0
Accepted
Nikolay
Telerik team
answered on 21 Mar 2012, 09:04 AM
Hi Watit,

We have tested the attached application and the root cause for the issue from the original screenshot is that the Fixsize property, which you map to YValue has some negative values, this is why some of the slices overlap. When you set it to 12.5 or any other positive value, then the chart would work as expected, however, you cannot map negative values to the YValue of a Doughnut chart, as it is not supported. Setting any value for Fixsize for all data points, be it 12.5 or 1.1 would result in the same data visualization and would work correctly.

Regards,
Nikolay
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Watit
Top achievements
Rank 2
answered on 23 Mar 2012, 04:03 AM
NikolayThank you.
Tags
Chart
Asked by
Watit
Top achievements
Rank 2
Answers by
Watit
Top achievements
Rank 2
Nikolay
Telerik team
Share this question
or