Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Data;
|
---|
4 | using System.Configuration;
|
---|
5 | using System.Collections;
|
---|
6 | using System.Web;
|
---|
7 | using System.Web.Security;
|
---|
8 | using System.Web.UI;
|
---|
9 | using System.Web.UI.WebControls;
|
---|
10 | using System.Web.UI.WebControls.WebParts;
|
---|
11 | using System.Web.UI.HtmlControls;
|
---|
12 |
|
---|
13 | using OpenFlashChart;
|
---|
14 |
|
---|
15 |
|
---|
16 | public partial class datafile_chart1 : System.Web.UI.Page
|
---|
17 | {
|
---|
18 | protected void Page_Load(object sender, EventArgs e)
|
---|
19 | {
|
---|
20 | OpenFlashChart.OpenFlashChart chart = new OpenFlashChart.OpenFlashChart();
|
---|
21 | chart.Title=new Title("AreaHollow");
|
---|
22 |
|
---|
23 | AreaHollow area = new AreaHollow();
|
---|
24 | Random random=new Random();
|
---|
25 | area.Colour = "#0fe";
|
---|
26 | area.DotSize = 2;
|
---|
27 | area.FillAlpha = 0.4;
|
---|
28 | area.Text = "Test";
|
---|
29 | area.Width = 2;
|
---|
30 | area.FontSize = 10;
|
---|
31 | IList values = new List<double>();
|
---|
32 | for (int i = 0; i < 12; i++)
|
---|
33 | values.Add(random.Next(i, i*2));
|
---|
34 | area.Values = values;
|
---|
35 | chart.AddElement(area);
|
---|
36 | XAxis xaxis=new XAxis();
|
---|
37 | // xaxis.Labels = new AxisLabel("text","#ef0",10,"vertical");
|
---|
38 | xaxis.Steps = 1;
|
---|
39 | xaxis.SetRange(0,12);
|
---|
40 | chart.X_Axis = xaxis;
|
---|
41 | YAxis yaxis = new YAxis();
|
---|
42 | yaxis.Steps = 4;
|
---|
43 | yaxis.SetRange(0,20);
|
---|
44 | chart.Y_Axis = yaxis;
|
---|
45 | string s = chart.ToString();
|
---|
46 | Response.Clear();
|
---|
47 | Response.CacheControl = "no-cache";
|
---|
48 | Response.Write(s);
|
---|
49 | Response.End();
|
---|
50 | }
|
---|
51 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.