There are currently: 12 anonymous users online. 0 of 204 registered users online. There have been 10438 Page Hits by 7986 users
There have been 10438 Page Hits by 7986 users
Custom Colour Pie Charts
C# Example Code
{ string []lables = {"Red", "Green", "Blue", "Yellow"}; System.Random r= new System.Random(); chart.Legend.Visible = true; chart.Legend.Position = Position.Right; chart.DataPointsUseSeriesColors = true; for(int i=0; i<4; i++) { chart.Series[i].Type = ChartType.Pie; chart.Series[i].Name = "Bah"; chart.Series[i].Style.LineColor = Color.Black; for(int j=0; j<lables.Length; j++) { chart.Series[i].Data.Add(new DataPoint((i*10) + j+1, lables[j])); } } }
ASP.Net C# Example
<%@ Register tagPrefix="SasqChart" Namespace="SasqChart" Assembly="SasqChart" %> <%@ Page Language="C#" %> <%@ Import Namespace="System.Drawing" %> <%@ Import Namespace="System.Drawing.Drawing2D" %> <%@ Import Namespace="System.Drawing.Imaging" %> <HTML> <HEAD> <title>Simple C# SasqChart Example</title> <script runat="server"> private void Page_Load(object sender, System.EventArgs e) { string []lables = {"Red", "Green", "Blue", "Yellow"}; System.Random r= new System.Random(); chart.Legend.Visible = true; chart.Legend.Position = Position.Right; chart.DataPointsUseSeriesColors = true; for(int i=0; i<4; i++) { chart.Series[i].Type = ChartType.Pie; chart.Series[i].Name = "Bah"; chart.Series[i].Style.LineColor = Color.Black; for(int j=0; j<lables.Length; j++) { chart.Series[i].Data.Add(new DataPoint((i*10) + j+1, lables[j])); } } } </script> </HEAD> <body> <SasqChart:WebChartControl id="chart" runat="server" width="600" height="400" /> </body> </HTML>