Rev | Line | |
---|
[7849] | 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 | public 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.