User (Legacy) Posted December 5, 2006 Report Share Posted December 5, 2006 I've been using SimpleChart, but now need ChartFX. Q. How can I hardcode a ChartFX Pie and dataset? Here is code for SimpleChart and dataset: if (dataset.Pie.Rows.Count > 0) { DataView dv = new DataView(dataset.Pie); foreach (DataRowView drv in dv) { object missing = Missing.Value; string names = Convert.ToString(drv["names"]); double counts = Convert.ToDouble(drv["counts"]); SimpleChart.pieChart.ChartData.Add(names, counts, FillStyle.scFillModeAutoSolid, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing); } for (int i = 1; i <= SimpleChart.pieChart.ChartData.Count; i++) { SimplyChart.pieChart.ChartData[i].Value = i * 100; tabControl2.TabPages[5].Text = ("Users#: " + "(" + i + ")"); } Link to comment Share on other sites More sharing options...
User (Legacy) Posted December 5, 2006 Author Report Share Posted December 5, 2006 I've been using SimpleChart, but now need ChartFX. Q. How can I hardcode a ChartFX Pie and dataset? Here is code for SimpleChart and dataset: if (dataset.Pie.Rows.Count > 0) { DataView dv = new DataView(dataset.Pie); foreach (DataRowView drv in dv) { object missing = Missing.Value; string names = Convert.ToString(drv["names"]); double counts = Convert.ToDouble(drv["counts"]); SimpleChart.pieChart.ChartData.Add(names, counts, FillStyle.scFillModeAutoSolid, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing); } for (int i = 1; i <= SimpleChart.pieChart.ChartData.Count; i++) { SimplyChart.pieChart.ChartData[i].Value = i * 100; tabControl2.TabPages[5].Text = ("Users#: " + "(" + i + ")"); } Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.