ASP.NET and Lines

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
mlouy
Newbie
Newbie
Posts: 2
Joined: Mon May 05, 2003 4:00 am
Contact:

ASP.NET and Lines

Post by mlouy » Wed Jul 27, 2005 4:41 pm

I need to create several webchart lines. Gann, Fib, Trend. etc. I've found that I can manually create a ..tools.drawline and manually display drawlineitems on the webchart. I'd like to allow the user to click on the chart to place a new line and then move the lines as needed.

Is it possible to Drag the lines with ASP.NET forms?
Also what would be the best way to create a gann fan?

Thanks

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Jul 28, 2005 9:01 am

Hi mlouy,

DrawLine tool is not available with WebChart component, it is only available with TChart components. However you have several options as using Line series for drawing those lines or also custom drawing on the chart canvas using something like:

Code: Select all

		private void WebChart1_AfterDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
		{
			g.Pen.Color=Color.Blue;
			g.Line(WebChart1.Chart.Axes.Left.Position,
							WebChart1.Chart.Axes.Bottom.Position,
							WebChart1.Chart.Axes.Left.Position+350,
							WebChart1.Chart.Axes.Bottom.Position-350);
		}
If you want the users to click on the chart to draw the lines you could have a look at the demo at http://www.steema.net/TeeChartForNET/index.aspx and have a look at the zooming examples. There users click on 2 points on the chart then you could use those points to draw the line. If users need to move the lines it may be more appropiate to use line series for each line.

Regarding trend lines, TeeChart already includes trend lines function so that you only have to provide this line the datasource series:

Code: Select all

		private void Page_Load(object sender, System.EventArgs e)
		{
			// Put user code to initialize the page here
			WebChart1.Chart.Series[0].FillSampleValues();
			WebChart1.Chart.Series[1].DataSource=WebChart1.Chart.Series[0];
		}
To create a Gann fan I'd use custom drawing on the chart canvas on AfterDraw event.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply