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

Last change on this file since 7937 was 7849, checked in by dennisw, 15 years ago
File size: 2.1 KB
Line 
1using System;
2using System.Data;
3using System.Configuration;
4using System.Collections;
5using System.Web;
6using System.Web.Security;
7using System.Web.UI;
8using System.Web.UI.WebControls;
9using System.Web.UI.WebControls.WebParts;
10using System.Web.UI.HtmlControls;
11using OpenFlashChart;
12public partial class datafile_linedot : System.Web.UI.Page
13{
14 protected void Page_Load(object sender, EventArgs e)
15 {
16 OpenFlashChart.OpenFlashChart chart = new OpenFlashChart.OpenFlashChart();
17 ArrayList data1 = new ArrayList();
18 Random rand = new Random(DateTime.Now.Millisecond);
19 for (double i = 0; i < 12; i++)
20 {
21 int temp = rand.Next(30);
22 if (temp > 20)
23 data1.Add(new LineDotValue(temp, "your tip","#fe0fe0"));
24 else
25 {
26 data1.Add(temp);
27 }
28 }
29 LineDotValue dotValue1 = new LineDotValue(rand.Next(30));
30 dotValue1.Sides = 3;
31
32 dotValue1.DotType = DotType.HOLLOW_DOT;
33 data1.Add(dotValue1);
34 LineDotValue dotValue2 = new LineDotValue(rand.Next(30));
35 dotValue2.IsHollow = true;
36 dotValue2.DotType = DotType.STAR;
37 data1.Add(dotValue2);
38
39 LineDotValue dotValue3 = new LineDotValue(rand.Next(30));
40 dotValue3.Sides = 4;
41
42 dotValue3.DotType = DotType.DOT;
43 data1.Add(dotValue3);
44 OpenFlashChart.LineHollow line1 = new LineHollow();
45 line1.Values = data1;
46 line1.HaloSize = 0;
47 line1.Width = 2;
48 line1.DotSize = 5;
49
50 line1.Tooltip = "提示:#val#";
51
52 chart.AddElement(line1);
53
54 chart.Title = new Title("line演示");
55 chart.Y_Axis.SetRange(0, 35, 5);
56 chart.Tooltip = new ToolTip("全局提示:#val#");
57 chart.Tooltip.Shadow = true;
58 chart.Tooltip.Colour = "#e43456";
59 chart.Tooltip.MouseStyle = ToolTipStyle.CLOSEST;
60 Response.Clear();
61 Response.CacheControl = "no-cache";
62 Response.Write(chart.ToPrettyString());
63 Response.End();
64 }
65}
Note: See TracBrowser for help on using the repository browser.