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

Donut chart doesn't look good in IE7

5 Answers 123 Views
Chart (HTML5)
This is a migrated thread and some comments may be shown as answers.
Segev
Top achievements
Rank 1
Segev asked on 19 Jun 2013, 05:28 AM
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.

5 Answers, 1 is accepted

Sort by
0
Stamo Gochev
Telerik team
answered on 21 Jun 2013, 06:01 AM
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.
0
Aravind
Top achievements
Rank 2
Iron
Iron
Iron
answered on 24 Jun 2013, 10:18 AM
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
0
Stamo Gochev
Telerik team
answered on 27 Jun 2013, 06:08 AM
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.
0
Aravind
Top achievements
Rank 2
Iron
Iron
Iron
answered on 28 Jun 2013, 07:15 AM
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
0
Danail Vasilev
Telerik team
answered on 01 Jul 2013, 04:55 PM
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.
Tags
Chart (HTML5)
Asked by
Segev
Top achievements
Rank 1
Answers by
Stamo Gochev
Telerik team
Aravind
Top achievements
Rank 2
Iron
Iron
Iron
Danail Vasilev
Telerik team
Share this question
or