Rev | Line | |
---|
[7849] | 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 | using OpenFlashChart;
|
---|
| 13 |
|
---|
| 14 | public 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));
|
---|
| 33 | labels.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.