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

Last change on this file since 7937 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 Scatter=OpenFlashChart.Scatter;
14using ScatterValue=OpenFlashChart.ScatterValue;
15
16public partial class datafile_ScatterLine : System.Web.UI.Page
17{
18 protected void Page_Load(object sender, EventArgs e)
19 {
20 OpenFlashChart.OpenFlashChart chart = new OpenFlashChart.OpenFlashChart();
21 List<ScatterValue> data1 = new List<ScatterValue>();
22 Random rand = new Random(DateTime.Now.Millisecond);
23 for (double i = 0; i < 12; i++)
24 {
25 data1.Add(new ScatterValue(i, rand.Next(30), 5));
26 }
27
28 OpenFlashChart.LineScatter line1 = new LineScatter();
29 line1.Values = data1;
30 chart.AddElement(line1);
31 line1.Colour = "#823445";
32 chart.Title = new Title("Scatter Line Demo");
33 chart.Y_Axis.SetRange(0, 35, 5);
34
35 chart.X_Axis.SetRange(0, 13);
36
37 Response.Clear();
38 Response.CacheControl = "no-cache";
39 Response.Write(chart.ToString());
40 Response.End();
41 }
42}
Note: See TracBrowser for help on using the repository browser.