source: code/Website/dot-net-library/written-by-xiao-yifang/ofcWebTest/datafile/Scatter.aspx.cs

Last change on this file was 7849, checked in by dennisw, 15 years ago
File size: 1.3 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Data;
4using System.Configuration;
5using System.Collections;
6using System.Web;
7using System.Web.Security;
8using System.Web.UI;
9using System.Web.UI.WebControls;
10using System.Web.UI.WebControls.WebParts;
11using System.Web.UI.HtmlControls;
12using OpenFlashChart;
13using LineHollow=OpenFlashChart.LineHollow;
14using ToolTip=OpenFlashChart.ToolTip;
15using ToolTipStyle=OpenFlashChart.ToolTipStyle;
16
17public partial class datafile_Scatter : System.Web.UI.Page
18{
19 protected void Page_Load(object sender, EventArgs e)
20 {
21 OpenFlashChart.OpenFlashChart chart = new OpenFlashChart.OpenFlashChart();
22 List<ScatterValue> data1 = new List<ScatterValue>();
23 Random rand = new Random(DateTime.Now.Millisecond);
24 for (double i = 0; i < 12; i++)
25 {
26 data1.Add(new ScatterValue(i,rand.Next(30),5));
27 }
28
29 OpenFlashChart.Scatter line1 = new Scatter("#876543",10);
30 line1.Values = data1;
31 chart.AddElement(line1);
32
33 chart.Title = new Title("Scatter Demo");
34 chart.Y_Axis.SetRange(0, 35, 5);
35
36 chart.X_Axis.SetRange(0,13);
37
38 Response.Clear();
39 Response.CacheControl = "no-cache";
40 Response.Write(chart.ToString());
41 Response.End();
42 }
43}
Note: See TracBrowser for help on using the repository browser.