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

Last change on this file was 7849, checked in by dennisw, 15 years ago
File size: 1.4 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;
13
14public partial class ChineseCharacter : 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
21 for (double i = 0; i < 6.2; i += 0.2)
22 {
23 data1.Add(Math.Sin(i) * 1.9 + 7);
24
25 }
26
27 OpenFlashChart.LineHollow line1 = new LineHollow();
28 line1.Values = data1;
29 line1.HaloSize = 1;
30 line1.Width = 2;
31 line1.DotSize = 5;
32
33
34
35 chart.AddElement(line1);
36 chart.Y_Legend = new Legend("Y轴坐标");
37 chart.Title = new Title("中文测试");
38 chart.Y_Axis.SetRange(0, 15, 5);
39
40 chart.X_Axis.SetLabels(new string[] { "中文测试" ,"第二"});
41
42 chart.X_Axis.Steps = 2;
43 chart.X_Axis.Labels.VisibleSteps = 2;
44
45 chart.X_Axis.Labels.Vertical = true;
46 Response.Clear();
47 Response.CacheControl = "no-cache";
48 Response.Write(chart.ToPrettyString());
49 Response.End();
50 }
51}
Note: See TracBrowser for help on using the repository browser.