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

Last change on this file since 7937 was 7849, checked in by dennisw, 15 years ago
File size: 1.8 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 YAxis=OpenFlashChart.YAxis;
12using OpenFlashChart;
13
14public partial class datafile_yaxis : System.Web.UI.Page
15{
16 protected void Page_Load(object sender, EventArgs e)
17 {
18 OpenFlashChart.OpenFlashChart chart = new OpenFlashChart.OpenFlashChart();
19 List<double> data1 = new List<double>();
20 Random rand = new Random(DateTime.Now.Millisecond);
21 for (double i = 0; i < 12; i++)
22 {
23 data1.Add(rand.Next(30));
24 }
25
26 OpenFlashChart.LineHollow line1 = new LineHollow();
27 line1.Values = data1;
28 line1.HaloSize = 0;
29 line1.Width = 2;
30 line1.DotSize = 5;
31
32 line1.Tooltip = "提示:#val#";
33
34 chart.AddElement(line1);
35
36 chart.Title = new Title("line演示");
37 // chart.Y_Axis.SetRange(0, 35, 5);
38 // chart.Y_Axis.Stroke = 2;
39 chart.Y_Axis_Right = new YAxis();
40 chart.Y_Axis_Right.TickLength=5;
41 chart.Y_Axis_Right.Stroke = 10;
42 line1.AttachToRightAxis(true);
43 //chart.Y_Axis_Right.Steps = 4;
44 chart.Y_Axis_Right.SetRange(0,30,10);
45 //chart.Y_Axis_Right
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.