Donut chart doesn't look good in IE7

6 posts, 0 answers
  1. Segev
    Segev avatar
    27 posts
    Member since:
    Sep 2010

    Posted 19 Jun 2013 Link to this post

    Hi,

    I'm using IE9 with document mode of IE7.

    The same code works good with Pie chart, but when I change the series type to 'DonutSeries', it doesn't look the same.
    It becomes a donut chart, but there is no 3d look, and there are no labels with the Y value around the chart.
    Attached an image with two screenshots of the same code, one with Pie, and the other with Donut.

    You can also go to your HtmlChart demos.
    Open you Pie chart demo, and your Donut chart demo.
    Open the dev tools of IE, and change the document mode to IE7.
    You'll see the difference.

    Thanks,
    Guy Segev.
  2. Stamo Gochev
    Admin
    Stamo Gochev avatar
    157 posts

    Posted 21 Jun 2013 Link to this post

    Hi,

    We are aware of this issue and I have logged it in our Feedback portal. As more and more people vote for it, we will raise the priority of this task and fix it as soon as possible.

    Regards,
    Stamo Gochev
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Aravind
    Aravind avatar
    41 posts
    Member since:
    Jun 2013

    Posted 24 Jun 2013 Link to this post

    Hi 
     I am new to Donut chart, and i am not having support ticket also,so i post my problem here,my need is i want bind data using datatable,i mean i have a select query using this query i need to plot datas in Donut chart

    i use  For Each row As DataRow In dt.Rows.... Next in that i need to ploat datas using row,pls give some idea and sample code pls asap

    Regards
      Aravind
  5. Stamo Gochev
    Admin
    Stamo Gochev avatar
    157 posts

    Posted 27 Jun 2013 Link to this post

    Hi Aravind,

    Am I correct that you are trying to data bind a DataTable to a Donut chart? If this is the case, then you can use the following code snippet:
    //create the DonutSeries
    DonutSeries donut = new DonutSeries();
    //set the databound field
    donut.DataFieldY = "yValue";
    //add the series to the chart
    DonutChart.PlotArea.Series.Add(donut);
     
    //data bind the chart
    DonutChart.DataSource = GetData();
    DonutChart.DataBind();

    where you can replace the GetData() method with your DataTable. I also attach a sample page which demonstrates this approach. Could you have a look at and try to apply it in your case?

    It is also a good idea to post your questions in a separate forum thread, which helps other people to search and find information if they have similar issues.

    Regards,
    Stamo Gochev
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  6. Aravind
    Aravind avatar
    41 posts
    Member since:
    Jun 2013

    Posted 28 Jun 2013 Link to this post

    Hai
       How to give name(legend) for series in Dount chart,it plot series correctly,but i don't know how to name.
    here i attach file in that no 1 is i g0t output,but i want like no 2 ( left side legend values), and below that i mention the values in data table,using for each statement i plot datas in dount chart.

    in dt1 have datas like mention in attachment

                       DonutChart.PlotArea.Series.Clear()
                              Dim col As New PieSeries()
                        For Each row1 As DataRow In dt1.Rows
                                   col.SeriesItems.Add(row1(1))
                         Next
                            DonutChart.PlotArea.Series.Add(col)

    Note : i am use dt1 as datatable in that i have 2 fields Department Name and Department Values
    like  Department      dep
            Protuction          2
            Marketing          4
           Accouting           3
            HR                     1
            Sales                 1
    The above code dynamically plot data from dt1, in dt1(row1(0)) --- department name and  dt1(row1(1))----department value
    how to bind department name in dount chart ?




     Pls reply me,its urgent
        Regards
            Aravind
  7. Danail Vasilev
    Admin
    Danail Vasilev avatar
    1493 posts

    Posted 01 Jul 2013 Link to this post

    Hi Aravind,

    Please find below my answer:
    • For a databound chart you can use the NameField property of the particular series to reference the series name in the datasource. For example:
    protected void dataBindChart(RadHtmlChart chart, string yField, string nameField, DataTable dataSource)
    {
        //create the DonutSeries
        DonutSeries donut = new DonutSeries();
        //set the y value databound field
        donut.DataFieldY = yField;
        //set the name value databound field
        donut.NameField = nameField;
        //add the series to the chart
        chart.PlotArea.Series.Add(donut);
     
        //data bind the chart
        chart.DataSource = dataSource;
        chart.DataBind();
    }
     
    protected DataTable GetData()
    {
        DataTable table = new DataTable();
        table.Columns.Add(new DataColumn("DepartmentValues"));
        table.Columns.Add(new DataColumn("DepartmentName"));
        table.Rows.Add(new object[] { 200, "name1" });
        table.Rows.Add(new object[] { 300, "name2" });
        table.Rows.Add(new object[] { 100, "name3" });
        return table;
    }

    • For programmatically created series, you can use the SeriesItems' name property, in order to name the particular series. For example:
    protected void programmaticChart(RadHtmlChart chart, string yField, string nameField)
    {
        DonutSeries donut = new DonutSeries();
     
        DataTable dt = GetData();
        foreach (DataRow row1 in dt.Rows)
        {
            PieSeriesItem piesi1 = new PieSeriesItem();
            piesi1.Y = Convert.ToDecimal(row1[yField]);
            piesi1.Name = (string)row1[nameField];
            donut.SeriesItems.Add(piesi1);
        }
        chart.PlotArea.Series.Add(donut);
    }
     
    protected DataTable GetData()
    {
        DataTable table = new DataTable();
        table.Columns.Add(new DataColumn("DepartmentValues"));
        table.Columns.Add(new DataColumn("DepartmentName"));
        table.Rows.Add(new object[] { 200, "name1" });
        table.Rows.Add(new object[] { 300, "name2" });
        table.Rows.Add(new object[] { 100, "name3" });
        return table;
    }

    When the series are named, their names will be displayed as legend. I have attached the full VS example to this forum thread.

    You can also find useful the server-side API of the RadHtmlChart as well as the HtmlChart - Programmatic Chart Creation online demo.

    Regards,
    Danail Vasilev
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017