[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 | using Scatter=OpenFlashChart.Scatter;
|
---|
| 14 | using ScatterValue=OpenFlashChart.ScatterValue;
|
---|
| 15 |
|
---|
| 16 | public partial class datafile_ScatterLine : System.Web.UI.Page
|
---|
| 17 | {
|
---|
| 18 | protected void Page_Load(object sender, EventArgs e)
|
---|
| 19 | {
|
---|
| 20 | OpenFlashChart.OpenFlashChart chart = new OpenFlashChart.OpenFlashChart();
|
---|
| 21 | List<ScatterValue> data1 = new List<ScatterValue>();
|
---|
| 22 | Random rand = new Random(DateTime.Now.Millisecond);
|
---|
| 23 | for (double i = 0; i < 12; i++)
|
---|
| 24 | {
|
---|
| 25 | data1.Add(new ScatterValue(i, rand.Next(30), 5));
|
---|
| 26 | }
|
---|
| 27 |
|
---|
| 28 | OpenFlashChart.LineScatter line1 = new LineScatter();
|
---|
| 29 | line1.Values = data1;
|
---|
| 30 | chart.AddElement(line1);
|
---|
| 31 | line1.Colour = "#823445";
|
---|
| 32 | chart.Title = new Title("Scatter Line Demo");
|
---|
| 33 | chart.Y_Axis.SetRange(0, 35, 5);
|
---|
| 34 |
|
---|
| 35 | chart.X_Axis.SetRange(0, 13);
|
---|
| 36 |
|
---|
| 37 | Response.Clear();
|
---|
| 38 | Response.CacheControl = "no-cache";
|
---|
| 39 | Response.Write(chart.ToString());
|
---|
| 40 | Response.End();
|
---|
| 41 | }
|
---|
| 42 | }
|
---|