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

Last change on this file since 7937 was 7849, checked in by dennisw, 15 years ago
File size: 1.2 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;
12public partial class datafile_HBar : System.Web.UI.Page
13{
14 protected void Page_Load(object sender, EventArgs e)
15 {
16 OpenFlashChart.OpenFlashChart chart = new OpenFlashChart.OpenFlashChart();
17 chart.Title = new Title("Bar Chart");
18
19 HBar bar = new OpenFlashChart.HBar();
20 bar.Colour = "#345";
21
22 bar.FillAlpha = 0.4;
23 bar.Text = "Test";
24
25 bar.FontSize = 10;
26 bar.Add(new HBarValue(0,5));
27 bar.Add(new HBarValue(6, 8));
28 bar.Add(new HBarValue(8, 10));
29 chart.AddElement(bar);
30 //chart.Y_Axis.SetLabels(new string[] { "hbar1", "hbar2", "hbar3" });
31 //chart.Y_Axis.Labels.Steps = 3;
32 chart.Tooltip = new ToolTip("提示:#val#");
33 string s = chart.ToPrettyString();
34
35 Response.Clear();
36 Response.CacheControl = "no-cache";
37 Response.Write(s);
38 Response.End();
39 }
40}
Note: See TracBrowser for help on using the repository browser.