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

Last change on this file since 7849 was 7849, checked in by dennisw, 15 years ago
File size: 1.7 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;
13
14public partial class datafile_Candle : System.Web.UI.Page
15{
16 protected void Page_Load(object sender, EventArgs e)
17 {
18 OpenFlashChart.OpenFlashChart chart = new OpenFlashChart.OpenFlashChart();
19 chart.Title = new Title("Bar Chart");
20
21 Candle candle = new OpenFlashChart.Candle();
22 Random random = new Random();
23 candle.Colour = "#345";
24
25 candle.FillAlpha = 0.4;
26 candle.Text = "Test";
27
28 candle.FontSize = 10;
29 ArrayList values = new ArrayList();
30 for (int i = 0; i < 12; i++)
31 values.Add(new CandleValue(random.Next(20,30),random.Next(15,20),random.Next(10,15),random.Next(5,10)));
32 candle.Values = values;
33 chart.AddElement(candle);
34 //XAxis xaxis = new XAxis();
35 //// xaxis.Labels = new AxisLabel("text","#ef0",10,"vertical");
36 //xaxis.Steps = 1;
37 //xaxis.Offset = true;
38 ////xaxis.SetRange(-2, 15);
39 //chart.X_Axis = xaxis;
40 //YAxis yaxis = new YAxis();
41 //yaxis.Steps = 4;
42 //yaxis.SetRange(0, 20);
43 //chart.Y_Axis = yaxis;
44
45 chart.Y_Axis.SetRange(0, 24, 3);
46 candle.Tooltip = "提示:#top#<br>#bottom#<br>#val#";
47 string s = chart.ToPrettyString();
48
49 Response.Clear();
50 Response.CacheControl = "no-cache";
51 Response.Write(s);
52 Response.End();
53 }
54}
Note: See TracBrowser for help on using the repository browser.