[7849] | 1 | using System;
|
---|
| 2 | using System.Data;
|
---|
| 3 | using System.Configuration;
|
---|
| 4 | using System.Collections.Generic;
|
---|
| 5 | using System.Web;
|
---|
| 6 | using System.Web.Security;
|
---|
| 7 | using System.Web.UI;
|
---|
| 8 | using System.Web.UI.WebControls;
|
---|
| 9 | using System.Web.UI.WebControls.WebParts;
|
---|
| 10 | using System.Web.UI.HtmlControls;
|
---|
| 11 | using OpenFlashChart;
|
---|
| 12 | public partial class datafile_radar : System.Web.UI.Page
|
---|
| 13 | {
|
---|
| 14 | protected void Page_Load(object sender, EventArgs e)
|
---|
| 15 | {
|
---|
| 16 | OpenFlashChart.OpenFlashChart chart = new OpenFlashChart.OpenFlashChart();
|
---|
| 17 | List<double> data1 = new List<double>();
|
---|
| 18 | Random rand = new Random(DateTime.Now.Millisecond);
|
---|
| 19 | for (double i = 0; i < 12; i++)
|
---|
| 20 | {
|
---|
| 21 | data1.Add(rand.Next(15,30));
|
---|
| 22 | }
|
---|
| 23 |
|
---|
| 24 | OpenFlashChart.AreaLine areaLine = new AreaLine();
|
---|
| 25 | areaLine.Values = data1;
|
---|
| 26 | areaLine.Width = 2;
|
---|
| 27 | areaLine.DotSize = 5;
|
---|
| 28 | areaLine.FillColor = "#345";
|
---|
| 29 | areaLine.Colour = "#fe0";
|
---|
| 30 | areaLine.FillAlpha = 0.5;
|
---|
| 31 | areaLine.Tooltip = "提示:#val#";
|
---|
| 32 | areaLine.Loop = true;
|
---|
| 33 | chart.AddElement(areaLine);
|
---|
| 34 | RadarAxis radarAxis = new RadarAxis(12);
|
---|
| 35 | radarAxis.Steps = 4;
|
---|
| 36 | //radarAxis.SetLabels(new string[] { "0", "1", "2", "3", "4", "5", "0", "1", "2", "3", "4", "5" ,"23","34"});
|
---|
| 37 | chart.Radar_Axis = radarAxis;
|
---|
| 38 | radarAxis.SetRange(0,30);
|
---|
| 39 | chart.Title = new Title("Radar Chart");
|
---|
| 40 | chart.Tooltip = new ToolTip("全局提示:#val#");
|
---|
| 41 | chart.Tooltip.Shadow = true;
|
---|
| 42 | chart.Tooltip.Colour = "#e43456";
|
---|
| 43 | chart.Tooltip.MouseStyle = ToolTipStyle.CLOSEST;
|
---|
| 44 |
|
---|
| 45 | Response.Clear();
|
---|
| 46 | Response.CacheControl = "no-cache";
|
---|
| 47 | Response.Write(chart.ToPrettyString());
|
---|
| 48 | Response.End();
|
---|
| 49 | }
|
---|
| 50 | }
|
---|