SasqChart
Home
Home
Chart Gallery
Thumbs
Bar Charts
Stacked Bar
Line Charts
Area Charts
Stacked Area
Pie Charts
Mixed Charts
Chart Styles
Axis Options
Layout Options
ASP.Net Tutorials
Base Example
DataSet Bind
WinForm Tutorials
Base Example
DataSet Bind
  Forums Login
Username:
Password:
 
Create account
Forget password?
 Who is Online

There are currently:
2 anonymous users online.

0 of 204 registered users online.

There have been 10428 Page Hits by 7976 users

 Search Forums

More search options


SmoothArea Chart with 72 DataPoints

C# Example Code

{                
    System.Random r= new System.Random();
    chart.XAxis.MajorTickStep = 18;
    chart.YAxis.Min = -2.0;
    chart.YAxis.Max = 2.0;
    chart.Series[0].Type = ChartType.Area;        
    chart.Series[0].Style.FillColor = Color.Red;
    chart.Series[0].Style.FillColorAlternate = Color.Red;            
    for (float f=-360.0f;f<=360.0f;f += 10.0f)
    {
        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, 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.XAxis.MajorTickStep = 18;
                chart.YAxis.Min = -2.0;
                chart.YAxis.Max = 2.0;
                chart.Series[0].Type = ChartType.Area;        
                chart.Series[0].Style.FillColor = Color.Red;
                chart.Series[0].Style.FillColorAlternate = Color.Red;            
                for (float f=-360.0f;f<=360.0f;f += 10.0f)
                {
                    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, f.ToString()));
                }                        
            }

        </script>
    </HEAD>
    <body>
        <SasqChart:WebChartControl id="chart" runat="server" width="600" height="400" />
    </body>
</HTML>