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
ASP.NET and Lines
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
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:
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:
To create a Gann fan I'd use custom drawing on the chart canvas on AfterDraw event.
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);
}
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];
}
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |