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

Last change on this file since 7937 was 7849, checked in by dennisw, 15 years ago
File size: 1.4 KB
Line 
1using System;
2using System.Data;
3using System.Configuration;
4using System.Collections.Generic;
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;
12
13public partial class datafile_lineClick : System.Web.UI.Page
14{
15 protected void Page_Load(object sender, EventArgs e)
16 {
17 OpenFlashChart.OpenFlashChart chart = new OpenFlashChart.OpenFlashChart();
18 List<double> data1 = new List<double>();
19 Random rand = new Random(DateTime.Now.Millisecond);
20 for (double i = 0; i < 12; i++)
21 {
22 data1.Add(rand.Next(30));
23 }
24
25 OpenFlashChart.LineHollow line1 = new LineHollow();
26 line1.Values = data1;
27 line1.HaloSize = 0;
28 line1.Width = 2;
29 line1.DotSize = 5;
30
31 line1.Tooltip = "提示:#val#";
32
33 chart.AddElement(line1);
34 line1.SetOnClickFunction("lineclick");
35 chart.Title = new Title("line演示");
36 chart.Y_Axis.SetRange(0, 35, 5);
37 chart.Tooltip = new ToolTip("全局提示:#val#");
38 chart.Tooltip.Shadow = true;
39 chart.Tooltip.Colour = "#e43456";
40 chart.Tooltip.MouseStyle = ToolTipStyle.CLOSEST;
41 Response.Clear();
42 Response.CacheControl = "no-cache";
43 Response.Write(chart.ToString());
44 Response.End();
45 }
46}
Note: See TracBrowser for help on using the repository browser.