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

pie chart rendering problem with just 2 SeriesItem

4 Answers 64 Views
Chart (HTML5)
This is a migrated thread and some comments may be shown as answers.
Steven
Top achievements
Rank 1
Steven asked on 02 Oct 2012, 04:28 PM

I am having a problem getting a pie chart to render where there are only two seriesitems and one of the values is 0.
When a third series is added then it has no problems with one of them having a value of 0

 

<telerik:RadHtmlChart runat="server" ID="PieChart2" Width="420"Transitions="true">
<Appearance>
<FillStyle BackgroundColor="White" />
</Appearance>
<ChartTitle Text="CM Standard > Primary > Patients with No Pending Tasks">
<Appearance Align="Center" BackgroundColor="White" Position="Top" />
</ChartTitle>
<PlotArea>
<Appearance>
<FillStyle BackgroundColor="White" />
</Appearance>
<Series>
<telerik:PieSeries StartAngle="90">
<LabelsAppearance Position="Circle" DataFormatString="{0} %" />
<TooltipsAppearance DataFormatString="{0} %" />
<Items>
<telerik:SeriesItem BackgroundColor="#ff9900" Exploded="true" Name="Internet Explorer" YValue="18.3" />
<telerik:SeriesItem BackgroundColor="#cccccc" Exploded="false" Name="Firefox" YValue="35.8" />
<%--<telerik:SeriesItem BackgroundColor="#bbbbbb" Exploded="false" Name="Firefox" YValue="35.8" />--%>
</Items>
</telerik:PieSeries>
</Series>
</PlotArea>
<Legend>
<Appearance BackgroundColor="White" Position="Bottom" Visible="true"/>
</Legend>
</telerik:RadHtmlChart>

 

public void LoadChartData()
{
    
            int totalpatients = Utilities.GetInt(ds.Tables[0].Rows[0]["TotalPatients"]);
            int PatientsNoPendingTasks = Utilities.GetInt(ds.Tables[0].Rows[0]["PatientsNoPendingTasks"]);
            int PatientsWithPendingTasks = Utilities.GetInt(ds.Tables[0].Rows[0]["PatientsWithPendingTasks"]);
            int PatientsOverDueforCHA = Utilities.GetInt(ds.Tables[0].Rows[0]["PatientsOverDueforCHA"]);
            int PatientsWithUpdatedCHA = totalpatients - PatientsOverDueforCHA;
 
 
            PieSeries pieSeries = (PieSeries)PieChart2.PlotArea.Series[0];
            PieChart2.PlotArea.Series[0].Items[0].Name = "No Pending Tasks";
            PieChart2.PlotArea.Series[0].Items[0].YValue = 0;// PatientsNoPendingTasks;
 
 
            PieChart2.PlotArea.Series[0].Items[1].YValue = 43;// PatientsNoPendingTasks;
            PieChart2.PlotArea.Series[0].Items[1].Name = "Has Pending Tasks";
 
            //PieChart2.PlotArea.Series[0].Items[2].YValue = 10;// PatientsNoPendingTasks;
            //PieChart2.PlotArea.Series[0].Items[2].Name = "Test";
 
 
}

 

 

4 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 03 Oct 2012, 03:18 PM
Hello Steven,

This is a known problem with older IE versions. We are aware of it and we are working on finding a way around it.


All the best,
Marin Bratanov
the Telerik team
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 their blog feed now.
0
Mark Strawmyer
Top achievements
Rank 1
answered on 31 Jan 2013, 06:22 PM
Any movement on this?  I have a similar issue with the Pie Chart where if one of the items is 100% and one or more 0 then the chart initially displays, but then disappears from the screen.
0
Danail Vasilev
Telerik team
answered on 04 Feb 2013, 12:01 PM
Hello Mark,

This issue has been fixed and it is not observed in the latest version of RadControls. Could you confirm the version of RadControls under which you are having the unexpected behaviour?

If it is observed in the latest official release (2012.3.1308), however, could you open a support ticket and attach a  sample that reproduces the problem, so that we can do an investigation locally?

All the best,
Danail Vasilev
the Telerik team
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 their blog feed now.
0
Mark Strawmyer
Top achievements
Rank 1
answered on 04 Feb 2013, 12:05 PM
I grabbed the latest version of the controls and it appears to have resolved the issue.
Tags
Chart (HTML5)
Asked by
Steven
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Mark Strawmyer
Top achievements
Rank 1
Danail Vasilev
Telerik team
Share this question
or