How to fix Size Piece of Doughnut?

6 posts, 1 answers
  1. Watit
    Watit avatar
    37 posts
    Member since:
    Oct 2011

    Posted 12 Mar 2012 Link to this post


    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)); 

  2. Watit
    Watit avatar
    37 posts
    Member since:
    Oct 2011

    Posted 12 Mar 2012 Link to this post

    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;
                 
            }
        }
  3. DevCraft banner
  4. Nikolay
    Admin
    Nikolay avatar
    385 posts

    Posted 14 Mar 2012 Link to this post

    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 >>
  5. Watit
    Watit avatar
    37 posts
    Member since:
    Oct 2011

    Posted 18 Mar 2012 Link to this post

    This my test project.
    You can Download Link bellow here
    http://dl.dropbox.com/u/50999266/317544_DoghnutChart-20120312.rar
  6. Answer
    Nikolay
    Admin
    Nikolay avatar
    385 posts

    Posted 21 Mar 2012 Link to this post

    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 >>
  7. Watit
    Watit avatar
    37 posts
    Member since:
    Oct 2011

    Posted 22 Mar 2012 Link to this post

    NikolayThank you.
Back to Top
DevCraft banner