There are currently: 2 anonymous users online. 0 of 1,436 registered users online. There have been 160338 Page Hits by 118885 users
There have been 160338 Page Hits by 118885 users
Smooth Stacked Area with Stacked Chart
C# Example Code
{ System.Random r= new System.Random(); for(int i=0; i<4; i++) { chart.Series[i].Type = ChartType.SmoothStackedArea; chart.Series[i].Style.Type = SasqChart.Style.FillType.GradientHorizontal; chart.Series[i+4].Type = ChartType.StackedBar; chart.Series[i+4].Style.Type = SasqChart.Style.FillType.GradientVertical; chart.BarWidth = 0.5f; for (int j=0;j<5;j++) { int v = ((i%2) == 0 ? -1 : +1) * (50 + (int)(r.NextDouble()* 50)); chart.Series[i].Data.Add(new DataPoint(v, j.ToString())); chart.Series[i+4].Data.Add(new DataPoint(v/2, j.ToString())); } } }
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) { System.Random r= new System.Random(); for(int i=0; i<4; i++) { chart.Series[i].Type = ChartType.SmoothStackedArea; chart.Series[i].Style.Type = SasqChart.Style.FillType.GradientHorizontal; chart.Series[i+4].Type = ChartType.StackedBar; chart.Series[i+4].Style.Type = SasqChart.Style.FillType.GradientVertical; chart.BarWidth = 0.5f; for (int j=0;j<5;j++) { int v = ((i%2) == 0 ? -1 : +1) * (50 + (int)(r.NextDouble()* 50)); chart.Series[i].Data.Add(new DataPoint(v, j.ToString())); chart.Series[i+4].Data.Add(new DataPoint(v/2, j.ToString())); } } } </script> </HEAD> <body> <SasqChart:WebChartControl id="chart" runat="server" width="600" height="400" /> </body> </HTML>