I have a series of polar data points that I want to add to a polar plot. How do I do this in VB 6.0 code?
The data points are:
Magnitude Phase angle
----------- -------------
15.6 45 degrees
18.2 120 degrees
5.4 -12 degrees
thanks,
russ
add series to polar plot
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Russ,
You need to populate polar series like this:
You need to populate polar series like this:
Code: Select all
With TChart1.Series(0).asPolar
.AddPolar 45, 15.6, "", clTeeColor
.AddPolar 120, 18.2, "", clTeeColor
.AddPolar 12, 5.4, "", clTeeColor
End With
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 |
re: add series to polar plot
Narcis: Thank you very much. I have additional question. How can I make the end point of each vector on the polar plot be an arrow head? Like hands on a clock where the end is an arrowhead.
Best Regards,
russ
Best Regards,
russ
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Russ,
Yes, you can do this using the OnGetSeriesPointerStyle event as shown here:
Yes, you can do this using the OnGetSeriesPointerStyle event as shown here:
Code: Select all
Dim EndVector As Integer
Private Sub Form_Load()
With TChart1.Series(0).asPolar
.AddPolar 45, 15.6, "", clTeeColor
.AddPolar 120, 18.2, "", clTeeColor
EndVector = .AddPolar(12, 5.4, "", clTeeColor)
End With
End Sub
Private Sub TChart1_OnGetSeriesPointerStyle(ByVal SeriesIndex As Long, ByVal ValueIndex As Long, AStyle As TeeChart.EPointerStyle)
If ((SeriesIndex = 0) And (ValueIndex = EndVector)) Then
AStyle = psDownTriangle
Else
AStyle = psNothing
End If
End Sub
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 |
re: add series to polar plot
Narcis: Thanks for all your help.
How can I plot these so that each is plotted as a radial vector from the origin? Similar to what is shown in the attached picture below (hope i built the link properly below).
Best Regards,
russ
How can I plot these so that each is plotted as a radial vector from the origin? Similar to what is shown in the attached picture below (hope i built the link properly below).
Best Regards,
russ
Hi russ,
the only way I can think of to do this would be to manually calculate each end bar position of the polar and draw the arrow-header directly on the canvas, using :
I've added this feature on our wish list (allow to draw arrow-headers with correct rotation), it will be considered to inclusion for the next releases.
the only way I can think of to do this would be to manually calculate each end bar position of the polar and draw the arrow-header directly on the canvas, using :
Code: Select all
Private Sub TChart1_OnSeriesAfterDrawValues(ByVal SeriesIndex As Long)
TChart1.Canvas.TriangleWithZ 10, 10, 20, 10, 15, 15, 0
End Sub
Pep Jorge
http://support.steema.com
http://support.steema.com