This commit is contained in:
2024-04-27 09:23:34 +02:00
commit 11e713ca6f
11884 changed files with 3263371 additions and 0 deletions

View File

@@ -0,0 +1,53 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using OpenFlashChart;
public partial class datafile_BarTypeTest : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
OpenFlashChart.OpenFlashChart chart = new OpenFlashChart.OpenFlashChart();
chart.Title = new Title("Bar Chart");
Bar bar = new OpenFlashChart.Bar();
Random random = new Random();
bar.Colour = "#345";
bar.BarType = BarType.BAR_DOME;
bar.FillAlpha = 0.4;
bar.Text = "Test";
bar.FontSize = 10;
List<double> values = new List<double>();
for (int i = 0; i < 12; i++)
values.Add(random.Next(i, i * 2));
bar.Values = values;
chart.AddElement(bar);
//XAxis xaxis = new XAxis();
//// xaxis.Labels = new AxisLabel("text","#ef0",10,"vertical");
//xaxis.Steps = 1;
//xaxis.Offset = true;
////xaxis.SetRange(-2, 15);
//chart.X_Axis = xaxis;
//YAxis yaxis = new YAxis();
//yaxis.Steps = 4;
//yaxis.SetRange(0, 20);
//chart.Y_Axis = yaxis;
chart.Y_Axis.SetRange(0, 24, 3);
bar.Tooltip = "提示:#top#<br>#bottom#<br>#val#";
string s = chart.ToPrettyString();
Response.Clear();
Response.CacheControl = "no-cache";
Response.Write(s);
Response.End();
}
}

View File

@@ -0,0 +1,54 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using OpenFlashChart;
public partial class datafile_Candle : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
OpenFlashChart.OpenFlashChart chart = new OpenFlashChart.OpenFlashChart();
chart.Title = new Title("Bar Chart");
Candle candle = new OpenFlashChart.Candle();
Random random = new Random();
candle.Colour = "#345";
candle.FillAlpha = 0.4;
candle.Text = "Test";
candle.FontSize = 10;
ArrayList values = new ArrayList();
for (int i = 0; i < 12; i++)
values.Add(new CandleValue(random.Next(20,30),random.Next(15,20),random.Next(10,15),random.Next(5,10)));
candle.Values = values;
chart.AddElement(candle);
//XAxis xaxis = new XAxis();
//// xaxis.Labels = new AxisLabel("text","#ef0",10,"vertical");
//xaxis.Steps = 1;
//xaxis.Offset = true;
////xaxis.SetRange(-2, 15);
//chart.X_Axis = xaxis;
//YAxis yaxis = new YAxis();
//yaxis.Steps = 4;
//yaxis.SetRange(0, 20);
//chart.Y_Axis = yaxis;
chart.Y_Axis.SetRange(0, 24, 3);
candle.Tooltip = "提示:#top#<br>#bottom#<br>#val#";
string s = chart.ToPrettyString();
Response.Clear();
Response.CacheControl = "no-cache";
Response.Write(s);
Response.End();
}
}

View File

@@ -0,0 +1,51 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using OpenFlashChart;
public partial class ChineseCharacter : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
OpenFlashChart.OpenFlashChart chart = new OpenFlashChart.OpenFlashChart();
List<double> data1 = new List<double>();
for (double i = 0; i < 6.2; i += 0.2)
{
data1.Add(Math.Sin(i) * 1.9 + 7);
}
OpenFlashChart.LineHollow line1 = new LineHollow();
line1.Values = data1;
line1.HaloSize = 1;
line1.Width = 2;
line1.DotSize = 5;
chart.AddElement(line1);
chart.Y_Legend = new Legend("Y轴坐标");
chart.Title = new Title("中文测试");
chart.Y_Axis.SetRange(0, 15, 5);
chart.X_Axis.SetLabels(new string[] { "中文测试" ,"第二"});
chart.X_Axis.Steps = 2;
chart.X_Axis.Labels.VisibleSteps = 2;
chart.X_Axis.Labels.Vertical = true;
Response.Clear();
Response.CacheControl = "no-cache";
Response.Write(chart.ToPrettyString());
Response.End();
}
}

View File

@@ -0,0 +1,57 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using OpenFlashChart;
using Bar=OpenFlashChart.Bar;
using ToolTip=OpenFlashChart.ToolTip;
using YAxis=OpenFlashChart.YAxis;
public partial class datafile_GlassBar : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
OpenFlashChart.OpenFlashChart chart = new OpenFlashChart.OpenFlashChart();
chart.Title = new Title("Bar Chart");
BarGlass bar = new OpenFlashChart.BarGlass();
Random random = new Random();
bar.Colour = "#345";
bar.FillAlpha = 0.4;
bar.Text = "Test";
bar.FontSize = 10;
List<BarGlassValue> values = new List<BarGlassValue>();
for (int i = 0; i < 11; i++)
{
values.Add(new BarGlassValue(random.Next(i, i * 2)));
}
BarGlassValue barGlassValue = new BarGlassValue(4);
barGlassValue.Tip = "#bottom#:top#top#<br>#val#";
barGlassValue.Color = "#eee";
values.Add(barGlassValue);
bar.Values = values;
chart.AddElement(bar);
YAxis yaxis = new YAxis();
yaxis.Steps = 4;
yaxis.SetRange(0, 20);
chart.Y_Axis = yaxis;
chart.Y_Axis.SetRange(0, 24, 3);
chart.Tooltip = new ToolTip("提示:#val#");
string s = chart.ToPrettyString();
Response.Clear();
Response.CacheControl = "no-cache";
Response.Write(s);
Response.End();
}
}

View File

@@ -0,0 +1,40 @@
using System;
using System.Data;
using System.Configuration;
using System.Collections.Generic;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using OpenFlashChart;
public partial class datafile_HBar : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
OpenFlashChart.OpenFlashChart chart = new OpenFlashChart.OpenFlashChart();
chart.Title = new Title("Bar Chart");
HBar bar = new OpenFlashChart.HBar();
bar.Colour = "#345";
bar.FillAlpha = 0.4;
bar.Text = "Test";
bar.FontSize = 10;
bar.Add(new HBarValue(0,5));
bar.Add(new HBarValue(6, 8));
bar.Add(new HBarValue(8, 10));
chart.AddElement(bar);
//chart.Y_Axis.SetLabels(new string[] { "hbar1", "hbar2", "hbar3" });
//chart.Y_Axis.Labels.Steps = 3;
chart.Tooltip = new ToolTip("提示:#val#");
string s = chart.ToPrettyString();
Response.Clear();
Response.CacheControl = "no-cache";
Response.Write(s);
Response.End();
}
}

View File

@@ -0,0 +1,81 @@
using System;
using System.Data;
using System.Configuration;
using System.Collections.Generic;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using OpenFlashChart;
public partial class datafile_Line : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
OpenFlashChart.OpenFlashChart chart = new OpenFlashChart.OpenFlashChart();
List<double> data1 = new List<double>();
List<double> data2 = new List<double>();
Random rand = new Random(DateTime.Now.Millisecond);
for(double i=0;i<12;i++)
{
data1.Add(rand.Next(30));
data2.Add(rand.Next(50));
}
OpenFlashChart.Line line1 = new Line();
line1.Values = data1;
line1.HaloSize = 0;
line1.Width = 2;
line1.DotSize = 5;
line1.DotStyleType.Tip = "#x_label#<br>#val#";
//line1.DotStyleType.Type = DotType.ANCHOR;
//line1.DotStyleType.Type = DotType.BOW;
line1.DotStyleType.Colour = "#467533";
line1.Tooltip = "#x_label#<br>提示:#val#";
OpenFlashChart.Line line2 = new Line();
line2.Values = data2;
line2.HaloSize = 1;
line2.Width = 3;
line2.DotSize = 4;
line2.DotStyleType.Tip = "#x_label#<br>#val#";
line1.DotStyleType.Type = DotType.ANCHOR;
//line1.DotStyleType.Type = DotType.BOW;
line2.DotStyleType.Colour = "#fe4567";
line2.Tooltip = "提示:#val#";
line2.AttachToRightAxis(true);
chart.AddElement(line1);
chart.AddElement(line2);
chart.Y_Legend=new Legend("中文test");
chart.Title = new Title("line演示");
chart.Y_Axis.SetRange(0,35,5);
chart.X_Axis.Labels.Color = "#e43456";
chart.X_Axis.Labels.VisibleSteps = 3;
chart.Y_Axis.Labels.FormatString = "$#val#";
chart.X_Axis.SetLabels(new string[]{"test1","test2"});
//chart.Y_Axis.SetLabels(new string[] { "test1", "test2", "test1", "test2", "test1", "test2" });
chart.X_Axis.Steps = 4;
chart.Y_Axis.Steps = 3;
chart.Y_Axis.Colour = "#ef6745";
chart.Y_Axis.Labels.Color = "#ef6745";
chart.Y_Axis.Offset = true;
chart.Y_RightLegend = new Legend("test y legend right");
chart.Y_Axis_Right = new YAxis();
chart.Y_Axis_Right.Steps = 8;
chart.Y_Axis_Right.TickLength = 4;
chart.Y_Axis.TickLength = 4;
chart.Y_Axis_Right.SetRange(0,60);
chart.Tooltip = new ToolTip("全局提示:#val#");
chart.Tooltip.Shadow = true;
chart.Tooltip.Colour = "#e43456";
chart.Tooltip.MouseStyle = ToolTipStyle.CLOSEST;
Response.Clear();
Response.CacheControl = "no-cache";
Response.Write(chart.ToPrettyString());
Response.End();
}
}

View File

@@ -0,0 +1,55 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using OpenFlashChart;
using Legend=OpenFlashChart.Legend;
using LineHollow=OpenFlashChart.LineHollow;
public partial class datafile_LineHollow : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
OpenFlashChart.OpenFlashChart chart = new OpenFlashChart.OpenFlashChart();
List<double> data1 = new List<double>();
Random rand = new Random(DateTime.Now.Millisecond);
for (double i = 0; i < 12; i++)
{
data1.Add(rand.Next(30));
}
OpenFlashChart.LineHollow line1 = new LineHollow();
line1.Values = data1;
line1.HaloSize = 0;
line1.Width = 2;
line1.DotSize = 5;
line1.DotStyleType.Tip = "#x_label#<br>#val#";
//line1.DotStyleType.Type = DotType.ANCHOR;
//line1.DotStyleType.Type = DotType.BOW;
line1.DotStyleType.Colour = "#467533";
line1.Tooltip = "提示:#val#";
chart.AddElement(line1);
chart.Y_Legend = new Legend("中文test");
chart.Title = new Title("line演示");
chart.Y_Axis.SetRange(0, 35, 5);
chart.X_Axis.Labels.Color = "#e43456";
chart.X_Axis.Steps = 4;
chart.Y_Axis.Steps = 3;
chart.Tooltip = new ToolTip("全局提示:#val#");
chart.Tooltip.Shadow = true;
chart.Tooltip.Colour = "#e43456";
chart.Tooltip.MouseStyle = ToolTipStyle.CLOSEST;
Response.Clear();
Response.CacheControl = "no-cache";
Response.Write(chart.ToPrettyString());
Response.End();
}
}

View File

@@ -0,0 +1,63 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using OpenFlashChart;
using AreaLine=OpenFlashChart.AreaLine;
using DotType=OpenFlashChart.DotType;
using ToolTip=OpenFlashChart.ToolTip;
using ToolTipStyle=OpenFlashChart.ToolTipStyle;
public partial class datafile_NumFormat : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
OpenFlashChart.OpenFlashChart chart = new OpenFlashChart.OpenFlashChart();
List<double> data1 = new List<double>();
Random rand = new Random(DateTime.Now.Millisecond);
for (double i = 0; i < 12; i++)
{
data1.Add(rand.Next(30));
}
OpenFlashChart.Area area = new Area();
area.Values = data1;
area.HaloSize = 0;
area.Width = 2;
area.DotSize = 5;
area.DotStyleType.Tip = "#x_label#<br>#val#";
//area.DotStyleType.Type = DotType.ANCHOR;
//area.DotStyleType.Type = DotType.BOW;
area.DotStyleType.Colour = "#467533";
area.Tooltip = "提示:#val#";
chart.AddElement(area);
chart.Y_Legend = new Legend("中文test");
chart.Title = new Title("line演示");
chart.Y_Axis.SetRange(0, 30000,10000);
chart.X_Axis.Labels.Color = "#e43456";
chart.X_Axis.Steps = 4;
//num format
chart.IsDecimalSeparatorComma = true;
chart.NumDecimals = 3;
chart.IsFixedNumDecimalsForced = true;
chart.Tooltip = new ToolTip("全局提示:#val#");
chart.Tooltip.Shadow = true;
chart.Tooltip.Colour = "#e43456";
chart.Tooltip.MouseStyle = ToolTipStyle.CLOSEST;
Response.Clear();
Response.CacheControl = "no-cache";
Response.Write(chart.ToPrettyString());
Response.End();
}
}

View File

@@ -0,0 +1,47 @@
using System;
using System.Collections.Generic;
using OpenFlashChart;
public partial class Pie : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
OpenFlashChart.OpenFlashChart chart = new OpenFlashChart.OpenFlashChart();
chart.Title = new Title("Pie Chart");
OpenFlashChart.Pie pie = new OpenFlashChart.Pie();
Random random = new Random();
List<PieValue> values = new List<PieValue>();
List<string> labels = new List<string>();
for (int i = 0; i < 12; i++)
{
values.Add(new PieValue(random.NextDouble(),"Pie"+i));
labels.Add(i.ToString());
}
//values.Add(0.2);
PieValue pieValue = new PieValue(10);
pieValue.Click = "http://xiao-yifang.blogspot.com";
values.Add(pieValue);
pie.Values = values;
pie.FontSize = 20;
pie.Alpha = .5;
PieAnimationSeries pieAnimationSeries = new PieAnimationSeries();
pieAnimationSeries.Add(new PieAnimation("bounce", 5));
pie.Animate = pieAnimationSeries;
//pie.GradientFillMode = false;
//pie.FillAlpha = 10;
//pie.Colour = "#fff";
pie.Colours = new string[]{"#04f","#1ff","#6ef","#f30"};
pie.Tooltip="#label#,#val# of #total##percent# of 100%";
chart.AddElement(pie);
chart.Bgcolor = "#202020";
string s = chart.ToPrettyString();
Response.Clear();
Response.CacheControl = "no-cache";
Response.Write(s);
Response.End();
}
}

View File

@@ -0,0 +1,43 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using OpenFlashChart;
using LineHollow=OpenFlashChart.LineHollow;
using ToolTip=OpenFlashChart.ToolTip;
using ToolTipStyle=OpenFlashChart.ToolTipStyle;
public partial class datafile_Scatter : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
OpenFlashChart.OpenFlashChart chart = new OpenFlashChart.OpenFlashChart();
List<ScatterValue> data1 = new List<ScatterValue>();
Random rand = new Random(DateTime.Now.Millisecond);
for (double i = 0; i < 12; i++)
{
data1.Add(new ScatterValue(i,rand.Next(30),5));
}
OpenFlashChart.Scatter line1 = new Scatter("#876543",10);
line1.Values = data1;
chart.AddElement(line1);
chart.Title = new Title("Scatter Demo");
chart.Y_Axis.SetRange(0, 35, 5);
chart.X_Axis.SetRange(0,13);
Response.Clear();
Response.CacheControl = "no-cache";
Response.Write(chart.ToString());
Response.End();
}
}

View File

@@ -0,0 +1,42 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using OpenFlashChart;
using Scatter=OpenFlashChart.Scatter;
using ScatterValue=OpenFlashChart.ScatterValue;
public partial class datafile_ScatterLine : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
OpenFlashChart.OpenFlashChart chart = new OpenFlashChart.OpenFlashChart();
List<ScatterValue> data1 = new List<ScatterValue>();
Random rand = new Random(DateTime.Now.Millisecond);
for (double i = 0; i < 12; i++)
{
data1.Add(new ScatterValue(i, rand.Next(30), 5));
}
OpenFlashChart.LineScatter line1 = new LineScatter();
line1.Values = data1;
chart.AddElement(line1);
line1.Colour = "#823445";
chart.Title = new Title("Scatter Line Demo");
chart.Y_Axis.SetRange(0, 35, 5);
chart.X_Axis.SetRange(0, 13);
Response.Clear();
Response.CacheControl = "no-cache";
Response.Write(chart.ToString());
Response.End();
}
}

View File

@@ -0,0 +1,51 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using OpenFlashChart;
using ToolTip=OpenFlashChart.ToolTip;
public partial class Tooltip : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
OpenFlashChart.OpenFlashChart chart = new OpenFlashChart.OpenFlashChart();
List<double> data3 = new List<double>();
Random random = new Random(DateTime.Now.Millisecond);
for (double i = 0; i < 10; i ++)
{
data3.Add(random.Next(-10,12));
}
OpenFlashChart.LineHollow line3 = new LineHollow();
line3.Values = data3;
line3.HaloSize = 2;
line3.Width = 6;
line3.DotSize = 4;
line3.FontSize = 12;
line3.Text = "line3";
line3.Tooltip = "my tip #val#";
chart.AddElement(line3);
chart.Title = new Title("Tooltip Demo");
chart.Y_Axis.SetRange(-10, 15, 5);
chart.Tooltip = new ToolTip("my tip #val#");
Response.Clear();
Response.CacheControl = "no-cache";
Response.Write(chart.ToPrettyString());
Response.End();
}
}

View File

@@ -0,0 +1,59 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using OpenFlashChart;
using AreaLine=OpenFlashChart.AreaLine;
using Legend=OpenFlashChart.Legend;
public partial class datafile_area : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
OpenFlashChart.OpenFlashChart chart = new OpenFlashChart.OpenFlashChart();
List<double> data1 = new List<double>();
Random rand = new Random(DateTime.Now.Millisecond);
for (double i = 0; i < 12; i++)
{
data1.Add(rand.Next(30));
}
OpenFlashChart.Area area = new Area();
area.Values = data1;
area.HaloSize = 0;
area.Width = 2;
area.DotSize = 5;
area.FontSize = 12;
area.DotStyleType.Tip = "#x_label#<br>#val#";
//area.DotStyleType.Type = DotType.ANCHOR;
area.DotStyleType.Type = DotType.BOW;
area.DotStyleType.Colour = "#467533";
area.Tooltip = "提示:#val#";
area.Colour = "#CC3399";
area.FillColor = "#343399";
area.FillAlpha = .5;
chart.AddElement(area);
chart.Y_Legend = new Legend("中文test");
chart.Title = new Title("line演示");
chart.Y_Axis.SetRange(0, 35, 5);
chart.X_Axis.Labels.Color = "#e43456";
chart.X_Axis.Steps = 4;
chart.Y_Axis.Steps = 3;
chart.Tooltip = new ToolTip("全局提示:#val#");
chart.Tooltip.Shadow = true;
chart.Tooltip.Colour = "#e43456";
chart.Tooltip.MouseStyle = ToolTipStyle.CLOSEST;
Response.Clear();
Response.CacheControl = "no-cache";
Response.Write(chart.ToPrettyString());
Response.End();
}
}

View File

@@ -0,0 +1,58 @@
using System;
using System.Data;
using System.Configuration;
using System.Collections.Generic;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using OpenFlashChart;
using XAxis=OpenFlashChart.XAxis;
using YAxis=OpenFlashChart.YAxis;
public partial class bar : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
OpenFlashChart.OpenFlashChart chart = new OpenFlashChart.OpenFlashChart();
chart.Title = new Title("Bar Chart");
Bar bar = new OpenFlashChart.Bar();
Random random = new Random();
bar.Colour = "#344565";
bar.Alpha = 0.8;
bar.Text = "Test";
bar.FontSize = 10;
List<object> values = new List<object>();
for (int i = 0; i < 12; i++)
values.Add(random.Next(i, i * 2));
BarValue barValue = new BarValue(12);
barValue.OnClick = "http://xiao-yifang.blogspot.com";
values.Add(barValue);
bar.Values = values;
chart.AddElement(bar);
XAxis xaxis = new XAxis();
xaxis.Labels.SetLabels(new string[] { "text", "#ef0", "10", "vertical" });
//xaxis.Steps = 1;
//xaxis.Offset = true;
////xaxis.SetRange(-2, 15);
chart.X_Axis = xaxis;
//YAxis yaxis = new YAxis();
//yaxis.Steps = 4;
//yaxis.SetRange(0, 20);
//chart.Y_Axis = yaxis;
chart.Y_Axis.SetRange(0,24,3);
bar.Tooltip = "提示:label:#x_label#<br>#top#<br>#bottom#<br>#val#";
string s = chart.ToPrettyString();
Response.Clear();
Response.CacheControl = "no-cache";
Response.Write(s);
Response.End();
}
}

View File

@@ -0,0 +1,53 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using OpenFlashChart;
public partial class bar3d : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
OpenFlashChart.OpenFlashChart chart = new OpenFlashChart.OpenFlashChart();
chart.Title = new Title("Bar 3D");
Bar3D bar = new OpenFlashChart.Bar3D();
Random random = new Random();
bar.Colour = "#345";
bar.FillAlpha = 0.4;
bar.Text = "Test";
bar.FontSize = 10;
List<double> values = new List<double>();
List<string> labels = new List<string>();
for (int i = 0; i < 12; i++)
{values.Add(random.Next(i, i * 2));
labels.Add(i.ToString());
}
bar.Values = values;
chart.AddElement(bar);
chart.X_Axis.Steps = 4;
chart.X_Axis.Labels.Steps = 4;
chart.X_Axis.SetLabels( labels);
chart.X_Axis.Labels.Vertical = true;
chart.X_Axis.Set3D(12);
chart.Y_Axis.Set3D(3);
chart.Y_Axis.Steps = 4;
string s = chart.ToString();
Response.Clear();
Response.CacheControl = "no-cache";
Response.Write(s);
Response.End();
}
}

View File

@@ -0,0 +1,53 @@
using System;
using System.Data;
using System.Configuration;
using System.Collections.Generic;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using OpenFlashChart;
public partial class barsketch : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
OpenFlashChart.OpenFlashChart chart = new OpenFlashChart.OpenFlashChart();
chart.Title = new Title("Sketch");
BarSketch bar = new OpenFlashChart.BarSketch("#045","#4f1",4);
Random random = new Random();
bar.Colour = "#345";
bar.FillAlpha = 0.4;
bar.Text = "Test";
bar.FontSize = 10;
List<double> values = new List<double>();
List<string> labels = new List<string>();
for (int i = 0; i < 12; i++)
{
values.Add(random.Next(i, i * 2));
labels.Add(i.ToString());
}
bar.Values = values;
chart.AddElement(bar);
chart.X_Axis.Steps = 4;
chart.X_Axis.Labels.Steps = 4;
chart.X_Axis.SetLabels( labels);
chart.X_Axis.Labels.Vertical = true;
chart.Y_Axis.Steps = 2;
Legend x = new Legend("x-axis legend");
chart.X_Legend = x;
string s = chart.ToString();
Response.Clear();
Response.CacheControl = "no-cache";
Response.Write(s);
Response.End();
}
}

View File

@@ -0,0 +1,51 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using OpenFlashChart;
public partial class datafile_chart1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
OpenFlashChart.OpenFlashChart chart = new OpenFlashChart.OpenFlashChart();
chart.Title=new Title("AreaHollow");
AreaHollow area = new AreaHollow();
Random random=new Random();
area.Colour = "#0fe";
area.DotSize = 2;
area.FillAlpha = 0.4;
area.Text = "Test";
area.Width = 2;
area.FontSize = 10;
IList values = new List<double>();
for (int i = 0; i < 12; i++)
values.Add(random.Next(i, i*2));
area.Values = values;
chart.AddElement(area);
XAxis xaxis=new XAxis();
// xaxis.Labels = new AxisLabel("text","#ef0",10,"vertical");
xaxis.Steps = 1;
xaxis.SetRange(0,12);
chart.X_Axis = xaxis;
YAxis yaxis = new YAxis();
yaxis.Steps = 4;
yaxis.SetRange(0,20);
chart.Y_Axis = yaxis;
string s = chart.ToString();
Response.Clear();
Response.CacheControl = "no-cache";
Response.Write(s);
Response.End();
}
}

View File

@@ -0,0 +1,46 @@
using System;
using System.Data;
using System.Configuration;
using System.Collections.Generic;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using OpenFlashChart;
public partial class datafile_lineClick : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
OpenFlashChart.OpenFlashChart chart = new OpenFlashChart.OpenFlashChart();
List<double> data1 = new List<double>();
Random rand = new Random(DateTime.Now.Millisecond);
for (double i = 0; i < 12; i++)
{
data1.Add(rand.Next(30));
}
OpenFlashChart.LineHollow line1 = new LineHollow();
line1.Values = data1;
line1.HaloSize = 0;
line1.Width = 2;
line1.DotSize = 5;
line1.Tooltip = "提示:#val#";
chart.AddElement(line1);
line1.SetOnClickFunction("lineclick");
chart.Title = new Title("line演示");
chart.Y_Axis.SetRange(0, 35, 5);
chart.Tooltip = new ToolTip("全局提示:#val#");
chart.Tooltip.Shadow = true;
chart.Tooltip.Colour = "#e43456";
chart.Tooltip.MouseStyle = ToolTipStyle.CLOSEST;
Response.Clear();
Response.CacheControl = "no-cache";
Response.Write(chart.ToString());
Response.End();
}
}

View File

@@ -0,0 +1,65 @@
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using OpenFlashChart;
public partial class datafile_linedot : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
OpenFlashChart.OpenFlashChart chart = new OpenFlashChart.OpenFlashChart();
ArrayList data1 = new ArrayList();
Random rand = new Random(DateTime.Now.Millisecond);
for (double i = 0; i < 12; i++)
{
int temp = rand.Next(30);
if (temp > 20)
data1.Add(new LineDotValue(temp, "your tip","#fe0fe0"));
else
{
data1.Add(temp);
}
}
LineDotValue dotValue1 = new LineDotValue(rand.Next(30));
dotValue1.Sides = 3;
dotValue1.DotType = DotType.HOLLOW_DOT;
data1.Add(dotValue1);
LineDotValue dotValue2 = new LineDotValue(rand.Next(30));
dotValue2.IsHollow = true;
dotValue2.DotType = DotType.STAR;
data1.Add(dotValue2);
LineDotValue dotValue3 = new LineDotValue(rand.Next(30));
dotValue3.Sides = 4;
dotValue3.DotType = DotType.DOT;
data1.Add(dotValue3);
OpenFlashChart.LineHollow line1 = new LineHollow();
line1.Values = data1;
line1.HaloSize = 0;
line1.Width = 2;
line1.DotSize = 5;
line1.Tooltip = "提示:#val#";
chart.AddElement(line1);
chart.Title = new Title("line演示");
chart.Y_Axis.SetRange(0, 35, 5);
chart.Tooltip = new ToolTip("全局提示:#val#");
chart.Tooltip.Shadow = true;
chart.Tooltip.Colour = "#e43456";
chart.Tooltip.MouseStyle = ToolTipStyle.CLOSEST;
Response.Clear();
Response.CacheControl = "no-cache";
Response.Write(chart.ToPrettyString());
Response.End();
}
}

View File

@@ -0,0 +1,50 @@
using System;
using System.Data;
using System.Configuration;
using System.Collections.Generic;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using OpenFlashChart;
public partial class datafile_radar : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
OpenFlashChart.OpenFlashChart chart = new OpenFlashChart.OpenFlashChart();
List<double> data1 = new List<double>();
Random rand = new Random(DateTime.Now.Millisecond);
for (double i = 0; i < 12; i++)
{
data1.Add(rand.Next(15,30));
}
OpenFlashChart.AreaLine areaLine = new AreaLine();
areaLine.Values = data1;
areaLine.Width = 2;
areaLine.DotSize = 5;
areaLine.FillColor = "#345";
areaLine.Colour = "#fe0";
areaLine.FillAlpha = 0.5;
areaLine.Tooltip = "提示:#val#";
areaLine.Loop = true;
chart.AddElement(areaLine);
RadarAxis radarAxis = new RadarAxis(12);
radarAxis.Steps = 4;
//radarAxis.SetLabels(new string[] { "0", "1", "2", "3", "4", "5", "0", "1", "2", "3", "4", "5" ,"23","34"});
chart.Radar_Axis = radarAxis;
radarAxis.SetRange(0,30);
chart.Title = new Title("Radar Chart");
chart.Tooltip = new ToolTip("全局提示:#val#");
chart.Tooltip.Shadow = true;
chart.Tooltip.Colour = "#e43456";
chart.Tooltip.MouseStyle = ToolTipStyle.CLOSEST;
Response.Clear();
Response.CacheControl = "no-cache";
Response.Write(chart.ToPrettyString());
Response.End();
}
}

View File

@@ -0,0 +1,51 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Configuration;
using System.Collections.Generic;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using OpenFlashChart;
public partial class datafile_stackbar : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
OpenFlashChart.OpenFlashChart chart = new OpenFlashChart.OpenFlashChart();
chart.Title = new Title("Stack Bar");
BarStack bar = new OpenFlashChart.BarStack();
List<BarStackValue> barStackValues = new List<BarStackValue>() ;
barStackValues.Add(2);
barStackValues.Add( new BarStackValue(3))
;
bar.AddStack(barStackValues);
List<BarStackValue> barStackValues1 = new List<BarStackValue>();
barStackValues1.Add(new BarStackValue(5,"#ef4565"));
barStackValues1.Add(new BarStackValue(3,"#876567"));
bar.AddStack(barStackValues1);
chart.AddElement(bar);
chart.X_Axis.Steps = 4;
chart.X_Axis.Labels.Steps = 1;
chart.X_Axis.SetLabels( new string[]{"bar1","bar2"});
chart.X_Axis.Labels.Vertical = true;
chart.X_Axis.Set3D(12);
chart.X_Axis.Offset = true;
chart.Y_Axis.Set3D(3);
chart.Y_Axis.Steps = 4;
string s = chart.ToPrettyString();
Response.Clear();
Response.CacheControl = "no-cache";
Response.Write(s);
Response.End();
}
}

View File

@@ -0,0 +1,55 @@
using System;
using System.Data;
using System.Configuration;
using System.Collections.Generic;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using YAxis=OpenFlashChart.YAxis;
using OpenFlashChart;
public partial class datafile_yaxis : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
OpenFlashChart.OpenFlashChart chart = new OpenFlashChart.OpenFlashChart();
List<double> data1 = new List<double>();
Random rand = new Random(DateTime.Now.Millisecond);
for (double i = 0; i < 12; i++)
{
data1.Add(rand.Next(30));
}
OpenFlashChart.LineHollow line1 = new LineHollow();
line1.Values = data1;
line1.HaloSize = 0;
line1.Width = 2;
line1.DotSize = 5;
line1.Tooltip = "提示:#val#";
chart.AddElement(line1);
chart.Title = new Title("line演示");
// chart.Y_Axis.SetRange(0, 35, 5);
// chart.Y_Axis.Stroke = 2;
chart.Y_Axis_Right = new YAxis();
chart.Y_Axis_Right.TickLength=5;
chart.Y_Axis_Right.Stroke = 10;
line1.AttachToRightAxis(true);
//chart.Y_Axis_Right.Steps = 4;
chart.Y_Axis_Right.SetRange(0,30,10);
//chart.Y_Axis_Right
chart.Tooltip = new ToolTip("全局提示:#val#");
chart.Tooltip.Shadow = true;
chart.Tooltip.Colour = "#e43456";
chart.Tooltip.MouseStyle = ToolTipStyle.CLOSEST;
Response.Clear();
Response.CacheControl = "no-cache";
Response.Write(chart.ToPrettyString());
Response.End();
}
}