Page 1 of 1
Arc method
Posted: Mon Nov 18, 2013 7:15 am
by 16667633
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
Re: Arc method
Posted: Mon Nov 18, 2013 7:34 am
by 16667633
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
Re: Arc method
Posted: Mon Nov 18, 2013 11:20 am
by narcis
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.
Re: Arc method
Posted: Mon Nov 18, 2013 5:39 pm
by 16667633
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 (61.81 KiB) Viewed 13240 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!
Re: Arc method
Posted: Tue Nov 19, 2013 12:55 pm
by narcis
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.
Re: Arc method
Posted: Tue Nov 19, 2013 1:09 pm
by narcis
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 (118.4 KiB) Viewed 13242 times
Re: Arc method
Posted: Tue Nov 19, 2013 3:55 pm
by 16667633
Thankyou! The delphi description explains how it works very well.