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

Last change on this file since 7937 was 7849, checked in by dennisw, 15 years ago
File size: 1.9 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 Legend=OpenFlashChart.Legend;
14using LineHollow=OpenFlashChart.LineHollow;
15
16public partial class datafile_LineHollow : 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.LineHollow line1 = new LineHollow();
29 line1.Values = data1;
30 line1.HaloSize = 0;
31 line1.Width = 2;
32 line1.DotSize = 5;
33 line1.DotStyleType.Tip = "#x_label#<br>#val#";
34 //line1.DotStyleType.Type = DotType.ANCHOR;
35 //line1.DotStyleType.Type = DotType.BOW;
36 line1.DotStyleType.Colour = "#467533";
37 line1.Tooltip = "提示:#val#";
38
39 chart.AddElement(line1);
40 chart.Y_Legend = new Legend("中文test");
41 chart.Title = new Title("line演示");
42 chart.Y_Axis.SetRange(0, 35, 5);
43 chart.X_Axis.Labels.Color = "#e43456";
44 chart.X_Axis.Steps = 4;
45 chart.Y_Axis.Steps = 3;
46 chart.Tooltip = new ToolTip("全局提示:#val#");
47 chart.Tooltip.Shadow = true;
48 chart.Tooltip.Colour = "#e43456";
49 chart.Tooltip.MouseStyle = ToolTipStyle.CLOSEST;
50 Response.Clear();
51 Response.CacheControl = "no-cache";
52 Response.Write(chart.ToPrettyString());
53 Response.End();
54 }
55}
Note: See TracBrowser for help on using the repository browser.