1 | using System;
|
---|
2 | using System.Data;
|
---|
3 | using System.Configuration;
|
---|
4 | using System.Collections.Generic;
|
---|
5 | using System.Web;
|
---|
6 | using System.Web.Security;
|
---|
7 | using System.Web.UI;
|
---|
8 | using System.Web.UI.WebControls;
|
---|
9 | using System.Web.UI.WebControls.WebParts;
|
---|
10 | using System.Web.UI.HtmlControls;
|
---|
11 | using OpenFlashChart;
|
---|
12 |
|
---|
13 | public 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 | }
|
---|