Arc method

TeeChart for ActiveX, COM and ASP
Post Reply
az7523
Newbie
Newbie
Posts: 6
Joined: Fri Oct 25, 2013 12:00 am

Arc method

Post by az7523 » Mon Nov 18, 2013 7:15 am

I'm trying to use the cavas.arc method and I'm wondering if there is a way to display the minor arc created instead of the major arc ?

Thanks

az7523
Newbie
Newbie
Posts: 6
Joined: Fri Oct 25, 2013 12:00 am

Re: Arc method

Post by az7523 » Mon Nov 18, 2013 7:34 am

And just to be more clear I would need to show a minor arc of an ellipse that is larger or outside the boundaries of the chart area, is that possible ?


Thanks

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

Re: Arc method

Post by Narcís » Mon Nov 18, 2013 11:20 am

Hello,

I'm sorry but I still don't understand what you are asking for. Could you please provide more detailed information? An example image would help.

Thanks in advance.
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

az7523
Newbie
Newbie
Posts: 6
Joined: Fri Oct 25, 2013 12:00 am

Re: Arc method

Post by az7523 » Mon Nov 18, 2013 5:39 pm

I have attached a jpegs with 2 images the first is of a circle bisected by a line. Can you provide an example showing the same circle displaying the major arc and an example displaying the minor arc.

From what I can determine the first two coordinate pairs of the arc parameters determine the rectangle that the circle/ellipse will be inscribed in, it's the other 2 coordinate pairs that are confusing me. I can't make any sense out of why I sometimes get the major arc and sometimes get the minor arc.
arc_example_4.JPG
arc_example_4.JPG (61.81 KiB) Viewed 13233 times
The second chart image shows basically what I'm trying to accomplish. I need to draw two large curves cutting through most of the chart area. The shapes are not exact but I think I could accomplish the result using two minor arcs of ellipses that were much larger than the chart area and centered off the chart to the left.

If there is an easier way to draw a curve on the chart I'd love to here it.


Thanks!

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

Re: Arc method

Post by Narcís » Tue Nov 19, 2013 12:55 pm

Hello,

Please bear in mind that TeeChart Pro ActiveX is a COM wrapper of TeeChart Pro VCL/FMX, written in Delphi. Having that in mind, probably the clearest explanation available is this from Delphi documentation.
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

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

Re: Arc method

Post by Narcís » Tue Nov 19, 2013 1:09 pm

Hello,

According to the documentation link in my previous post, using this code:

Code: Select all

Private Sub Form_Load()
    TChart1.Aspect.View3D = False
    TChart1.AddSeries scPoint
    TChart1.Series(0).FillSampleValues 25
    
    Me.ScaleMode = vbPixels
End Sub

Private Sub TChart1_OnAfterDraw()
  TChart1.Canvas.Pen.Color = vbRed
  TChart1.Canvas.Arc -TChart1.Width / 2, 100, TChart1.Width / 2, TChart1.Height * 2, TChart1.Width / 2, TChart1.Axis.Bottom.Position, TChart1.Axis.Left.Position, TChart1.Axis.Left.IStartPos
End Sub
You get this:
CanvasArc.jpg
CanvasArc.jpg (118.4 KiB) Viewed 13235 times
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

az7523
Newbie
Newbie
Posts: 6
Joined: Fri Oct 25, 2013 12:00 am

Re: Arc method

Post by az7523 » Tue Nov 19, 2013 3:55 pm

Thankyou! The delphi description explains how it works very well.

Post Reply