User (Legacy) Posted January 4, 2005 Report Share Posted January 4, 2005 Hi, I am using chartfx interner 5.5 and using C# .net by using a wrapper class for the com object. I am having problems with the pie charts. With the same dataset i am getting different behaviour for pie and bar. Bar looks correct but pie is reduced in size as it expects one more pie which is not visible because there is no data for that pie. So we see an empty space to the right of the pie. I am also sending a code snippet used to output this. public void setSeries(ChartFXClass chart, DataTable table) { string chtType=ChartType.ToString(); DataRowCollection rows = table.Rows; for(int i=0; i<table.Rows.Count; i++) { for(int j=0; j<table.Columns.Count; j++) { DataRow r = rows[i]; if (chtType.Equals("bar")) { chart.set_ValueEx(Convert.ToByte(i),j,Convert.ToDouble(r[j])); } else { chart.set_ValueEx(Convert.ToByte(j),i,Convert.ToDouble(r[j])); } } } } Please help. Thanks, Kunal Agrawal Link to comment Share on other sites More sharing options...
Software FX Posted January 5, 2005 Report Share Posted January 5, 2005 A Pie chart will draw a Pie for each series (Column in your dataset) and a slice for each point (row in your dataset). It looks like your chart has two series so this behavior is by design. If you want just ONE pie, your dataset must contain only one column. -- FP Software FX Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.