Quantcast
Channel: AjaxControlToolkit Work Item Rss Feed
Viewing all articles
Browse latest Browse all 4356

Commented Issue: PieChart doesn't render all segments correctly [27373]

$
0
0
AjaxToolkit Version: 4.1.7.123
Using IE9.

When populating the PieChart via code if a segment covers more than approx 50% then it isn't displayed correctly.

Code:

string[] surveyItems = new string[3] { "Yes", "No", "Don't Know" };
int[] surveyAnswers = new int[3] { 1, 5, 1 };

for (int i = 0; i < 3; i++)
{
PieChartValue pcv = new PieChartValue();
pcv.Category = surveyItems[i].ToString();
pcv.Data = surveyAnswers[i];
PieChart1.PieChartValues.Add(pcv);
}

This issue can also be replicated by 'hardcoding' the values in the aspx page.

<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</asp:ToolkitScriptManager>
<asp:PieChart ID="PieChart1" runat="server">
<PieChartValues>
<asp:PieChartValue Category="Yes" Data="1" PieChartValueColor=""
PieChartValueStrokeColor="" />
<asp:PieChartValue Category="No" Data="5" PieChartValueColor=""
PieChartValueStrokeColor="" />
<asp:PieChartValue Category="Don't Know" Data="1" PieChartValueColor=""
PieChartValueStrokeColor="" />
</PieChartValues>
</asp:PieChart>



Comments: Sorry for my english, but I think I found the source of the problem. according to specific SVG when you have to draw a "great arc" you must enable the appropriate flag. Here's an example: Code generated by the control piechart M 282.5 A 36.6667 96.6667 96.6667 0 0 1 222,297 57.7022 L 282.5 133 333 Z Correct code manually M 282.5 A 36.6667 96.6667 96.6667 0 1 1 222,297 57.7022 L 282.5 133 333 Z Press F12 and inserting the chart is displayed correctly. This is the specification to which I refer: A ------------------------ rx, ry x-axis-rotation large-arch-flags, sweepflag x, y ------------------------ Draws an elliptical arch from the current point to the point x, y. rx and ry are the elliptical radius in x and y direction. The x-rotation Determines how much the arch is to be rotated around the x-axis. It only Seems to have an effect When rx and ry have different values. The large-arch-flags does not seem to be used (can be either 0 or 1). Neither value (0 or 1) changes the arch. The sweep-flag Determines the direction to draw in the arch. Thank you all and I hope to be helpful

Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>