|
|
|
|
|
|
|
|
There are currently:
42 anonymous users online.
0 of 204 registered users online.
There have been 10469 Page Hits by
8017 users
|
|
|
|
|
Smooth Stacked Area Chart with 32 DataPoints
C# Example Code
{
System.Random r= new System.Random();
chart.Theme = Theme.Oranges;
chart.XAxis.MajorTickStep = 9;
chart.Series[0].Type = ChartType.SmoothStackedArea;
chart.Series[1].Type = ChartType.SmoothStackedArea;
chart.Series[2].Type = ChartType.SmoothStackedArea;
chart.Series[3].Type = ChartType.SmoothStackedArea;
chart.Series[0].Style.FillColor = Color.Red;
chart.Series[1].Style.FillColor = Color.Yellow;
chart.Series[2].Style.FillColor = Color.Red;
chart.Series[3].Style.FillColor = Color.Yellow;
chart.Series[0].Style.LineColor = Color.Red;
chart.Series[1].Style.LineColor = Color.Yellow;
chart.Series[2].Style.LineColor = Color.Red;
chart.Series[3].Style.LineColor = Color.Yellow;
for (float f=-360.0f;f<=360.0f;f += 22.5f)
{
double a = f * (Math.PI/180);
double val = (Math.Sin(a*2.5) + Math.Sin(a*3.5)) * 0.5;
chart.Series[0].Data.Add(new DataPoint(val+1.5, f.ToString()));
chart.Series[2].Data.Add(new DataPoint(val-1.5, f.ToString()));
chart.Series[1].Data.Add(new DataPoint(3.5-val, f.ToString()));
chart.Series[3].Data.Add(new DataPoint(-3.5-val, f.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();
chart.Theme = Theme.Oranges;
chart.XAxis.MajorTickStep = 9;
chart.Series[0].Type = ChartType.SmoothStackedArea;
chart.Series[1].Type = ChartType.SmoothStackedArea;
chart.Series[2].Type = ChartType.SmoothStackedArea;
chart.Series[3].Type = ChartType.SmoothStackedArea;
chart.Series[0].Style.FillColor = Color.Red;
chart.Series[1].Style.FillColor = Color.Yellow;
chart.Series[2].Style.FillColor = Color.Red;
chart.Series[3].Style.FillColor = Color.Yellow;
chart.Series[0].Style.LineColor = Color.Red;
chart.Series[1].Style.LineColor = Color.Yellow;
chart.Series[2].Style.LineColor = Color.Red;
chart.Series[3].Style.LineColor = Color.Yellow;
for (float f=-360.0f;f<=360.0f;f += 22.5f)
{
double a = f * (Math.PI/180);
double val = (Math.Sin(a*2.5) + Math.Sin(a*3.5)) * 0.5;
chart.Series[0].Data.Add(new DataPoint(val+1.5, f.ToString()));
chart.Series[2].Data.Add(new DataPoint(val-1.5, f.ToString()));
chart.Series[1].Data.Add(new DataPoint(3.5-val, f.ToString()));
chart.Series[3].Data.Add(new DataPoint(-3.5-val, f.ToString()));
}
}
</script>
</HEAD>
<body>
<SasqChart:WebChartControl id="chart" runat="server" width="600" height="400" />
</body>
</HTML>
|