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

Last change on this file since 7937 was 7849, checked in by dennisw, 15 years ago
File size: 1.5 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 bar3d : System.Web.UI.Page
15{
16 protected void Page_Load(object sender, EventArgs e)
17 {
18 OpenFlashChart.OpenFlashChart chart = new OpenFlashChart.OpenFlashChart();
19 chart.Title = new Title("Bar 3D");
20
21 Bar3D bar = new OpenFlashChart.Bar3D();
22 Random random = new Random();
23 bar.Colour = "#345";
24
25 bar.FillAlpha = 0.4;
26 bar.Text = "Test";
27
28 bar.FontSize = 10;
29 List<double> values = new List<double>();
30 List<string> labels = new List<string>();
31 for (int i = 0; i < 12; i++)
32 {values.Add(random.Next(i, i * 2));
33labels.Add(i.ToString());
34 }
35 bar.Values = values;
36 chart.AddElement(bar);
37 chart.X_Axis.Steps = 4;
38 chart.X_Axis.Labels.Steps = 4;
39 chart.X_Axis.SetLabels( labels);
40 chart.X_Axis.Labels.Vertical = true;
41
42 chart.X_Axis.Set3D(12);
43
44 chart.Y_Axis.Set3D(3);
45 chart.Y_Axis.Steps = 4;
46
47 string s = chart.ToString();
48 Response.Clear();
49 Response.CacheControl = "no-cache";
50 Response.Write(s);
51 Response.End();
52 }
53}
Note: See TracBrowser for help on using the repository browser.