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 ChineseCharacter : System.Web.UI.Page
|
---|
| 15 | {
|
---|
| 16 | protected void Page_Load(object sender, EventArgs e)
|
---|
| 17 | {
|
---|
| 18 | OpenFlashChart.OpenFlashChart chart = new OpenFlashChart.OpenFlashChart();
|
---|
| 19 | List<double> data1 = new List<double>();
|
---|
| 20 |
|
---|
| 21 | for (double i = 0; i < 6.2; i += 0.2)
|
---|
| 22 | {
|
---|
| 23 | data1.Add(Math.Sin(i) * 1.9 + 7);
|
---|
| 24 |
|
---|
| 25 | }
|
---|
| 26 |
|
---|
| 27 | OpenFlashChart.LineHollow line1 = new LineHollow();
|
---|
| 28 | line1.Values = data1;
|
---|
| 29 | line1.HaloSize = 1;
|
---|
| 30 | line1.Width = 2;
|
---|
| 31 | line1.DotSize = 5;
|
---|
| 32 |
|
---|
| 33 |
|
---|
| 34 |
|
---|
| 35 | chart.AddElement(line1);
|
---|
| 36 | chart.Y_Legend = new Legend("Y轴坐标");
|
---|
| 37 | chart.Title = new Title("中文测试");
|
---|
| 38 | chart.Y_Axis.SetRange(0, 15, 5);
|
---|
| 39 |
|
---|
| 40 | chart.X_Axis.SetLabels(new string[] { "中文测试" ,"第二"});
|
---|
| 41 |
|
---|
| 42 | chart.X_Axis.Steps = 2;
|
---|
| 43 | chart.X_Axis.Labels.VisibleSteps = 2;
|
---|
| 44 |
|
---|
| 45 | chart.X_Axis.Labels.Vertical = true;
|
---|
| 46 | Response.Clear();
|
---|
| 47 | Response.CacheControl = "no-cache";
|
---|
| 48 | Response.Write(chart.ToPrettyString());
|
---|
| 49 | Response.End();
|
---|
| 50 | }
|
---|
| 51 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.