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

Last change on this file since 7849 was 7849, checked in by dennisw, 15 years ago
File size: 2.0 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 AreaLine=OpenFlashChart.AreaLine;
14using Legend=OpenFlashChart.Legend;
15
16public partial class datafile_area : System.Web.UI.Page
17{
18 protected void Page_Load(object sender, EventArgs e)
19 {
20 OpenFlashChart.OpenFlashChart chart = new OpenFlashChart.OpenFlashChart();
21 List<double> data1 = new List<double>();
22 Random rand = new Random(DateTime.Now.Millisecond);
23 for (double i = 0; i < 12; i++)
24 {
25 data1.Add(rand.Next(30));
26 }
27
28 OpenFlashChart.Area area = new Area();
29 area.Values = data1;
30 area.HaloSize = 0;
31 area.Width = 2;
32 area.DotSize = 5;
33 area.FontSize = 12;
34 area.DotStyleType.Tip = "#x_label#<br>#val#";
35 //area.DotStyleType.Type = DotType.ANCHOR;
36 area.DotStyleType.Type = DotType.BOW;
37 area.DotStyleType.Colour = "#467533";
38 area.Tooltip = "提示:#val#";
39 area.Colour = "#CC3399";
40 area.FillColor = "#343399";
41 area.FillAlpha = .5;
42 chart.AddElement(area);
43 chart.Y_Legend = new Legend("中文test");
44 chart.Title = new Title("line演示");
45 chart.Y_Axis.SetRange(0, 35, 5);
46 chart.X_Axis.Labels.Color = "#e43456";
47 chart.X_Axis.Steps = 4;
48 chart.Y_Axis.Steps = 3;
49
50 chart.Tooltip = new ToolTip("全局提示:#val#");
51 chart.Tooltip.Shadow = true;
52 chart.Tooltip.Colour = "#e43456";
53 chart.Tooltip.MouseStyle = ToolTipStyle.CLOSEST;
54 Response.Clear();
55 Response.CacheControl = "no-cache";
56 Response.Write(chart.ToPrettyString());
57 Response.End();
58 }
59}
Note: See TracBrowser for help on using the repository browser.