source: code/Website/dot-net-library/written-by-xiao-yifang/ofcWebTest/datafile/Tooltip.aspx.cs@ 7937

Last change on this file since 7937 was 7849, checked in by dennisw, 15 years ago
File size: 1.4 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Data;
4using System.Configuration;
5using System.Collections;
6using System.Web;
7using System.Web.Security;
8using System.Web.UI;
9using System.Web.UI.WebControls;
10using System.Web.UI.WebControls.WebParts;
11using System.Web.UI.HtmlControls;
12using OpenFlashChart;
13using ToolTip=OpenFlashChart.ToolTip;
14
15public partial class Tooltip : System.Web.UI.Page
16{
17 protected void Page_Load(object sender, EventArgs e)
18 {
19 OpenFlashChart.OpenFlashChart chart = new OpenFlashChart.OpenFlashChart();
20 List<double> data3 = new List<double>();
21 Random random = new Random(DateTime.Now.Millisecond);
22 for (double i = 0; i < 10; i ++)
23 {
24 data3.Add(random.Next(-10,12));
25 }
26
27
28 OpenFlashChart.LineHollow line3 = new LineHollow();
29 line3.Values = data3;
30 line3.HaloSize = 2;
31 line3.Width = 6;
32 line3.DotSize = 4;
33 line3.FontSize = 12;
34
35
36 line3.Text = "line3";
37
38 line3.Tooltip = "my tip #val#";
39
40 chart.AddElement(line3);
41 chart.Title = new Title("Tooltip Demo");
42 chart.Y_Axis.SetRange(-10, 15, 5);
43
44 chart.Tooltip = new ToolTip("my tip #val#");
45
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.