Hi all,
How to make pie charts/ line charts from the database data?
Thanks,
Darma
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Vishnujeet KumarPosted Nov 12, 2012, 10:21 AM
Useful article and chart control, try this .
http://www.dotnetspark.com/kb/2662-mschart---drilldown-charts-part-ii.aspx
http://social.msdn.microsoft.com/Forums/en-US/MSWinWebChart/threads/
Marina EberhardtPosted Nov 11, 2014, 5:00 AM
Code comes from this article about creating an excel chart element in C#.
White EvalnPosted Nov 13, 2012, 1:32 AM
since the code is too long, I only show you a part of pie chart code:
chart1.CategoryLabels.ColX = ((System.Byte)(1));
chart1.CategoryLabels.ColY = ((System.Byte)(1));
chart1.CategoryLabels.RowX = 1;
chart1.CategoryLabels.RowY = 9;
chart1.CategoryLabelsColumn = "Name";
chart1.DataRangeSheet = "charts";
chart1.Position.AutoPosition.Height = 12;
chart1.Position.AutoPosition.Top = 1;
chart1.Position.AutoPosition.Width = 6;
chartSeries1.DataColumn = "Population";
chartSeries1.DataRangeSheet = "charts";
chartSeries1.Title = "Population";
chart1.Series.Add(chartSeries1);
chart1.Style = Spire.DataExport.XLS.ChartStyle.Pie3d;
chart1.Title = "Chart demo";
workSheet3.Charts.Add(chart1);
You can know more detail here:
Export to Excel and Create Pie Chart