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

Last change on this file since 7937 was 7849, checked in by dennisw, 15 years ago
File size: 1.5 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;
12
13using OpenFlashChart;
14
15
16public partial class datafile_chart1 : System.Web.UI.Page
17{
18 protected void Page_Load(object sender, EventArgs e)
19 {
20 OpenFlashChart.OpenFlashChart chart = new OpenFlashChart.OpenFlashChart();
21 chart.Title=new Title("AreaHollow");
22
23 AreaHollow area = new AreaHollow();
24 Random random=new Random();
25 area.Colour = "#0fe";
26 area.DotSize = 2;
27 area.FillAlpha = 0.4;
28 area.Text = "Test";
29 area.Width = 2;
30 area.FontSize = 10;
31 IList values = new List<double>();
32 for (int i = 0; i < 12; i++)
33 values.Add(random.Next(i, i*2));
34 area.Values = values;
35 chart.AddElement(area);
36 XAxis xaxis=new XAxis();
37 // xaxis.Labels = new AxisLabel("text","#ef0",10,"vertical");
38 xaxis.Steps = 1;
39 xaxis.SetRange(0,12);
40 chart.X_Axis = xaxis;
41 YAxis yaxis = new YAxis();
42 yaxis.Steps = 4;
43 yaxis.SetRange(0,20);
44 chart.Y_Axis = yaxis;
45 string s = chart.ToString();
46 Response.Clear();
47 Response.CacheControl = "no-cache";
48 Response.Write(s);
49 Response.End();
50 }
51}
Note: See TracBrowser for help on using the repository browser.