How to change the shape of the series point
How to change the shape of the series point
Hi,
I would like to use different shapes for some series points.
(1) All the series points use the same shape like circle, square, etc.
(2) Some points use circle, and some use square, and the rest use default one.
In both of them, the connection line between two sequential points is still needed, not like the bubble points or point3D which have no connection line. How can I realize these functions?
Thanks a lot.
David
I would like to use different shapes for some series points.
(1) All the series points use the same shape like circle, square, etc.
(2) Some points use circle, and some use square, and the rest use default one.
In both of them, the connection line between two sequential points is still needed, not like the bubble points or point3D which have no connection line. How can I realize these functions?
Thanks a lot.
David
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi David,
Yes, you can do it using the OnGetSeriesPointerStyle event:
Yes, you can do it using the OnGetSeriesPointerStyle event:
Code: Select all
Private Sub TChart1_OnGetSeriesPointerStyle(ByVal SeriesIndex As Long, ByVal ValueIndex As Long, AStyle As TeeChart.EPointerStyle)
If TChart1.Series(SeriesIndex).YValues.Value(ValueIndex) Mod 2 = 0 Then
AStyle = psCircle
Else
AStyle = psRectangle
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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi David,
It works fine for me here using v7.0.1.2. Have you added TeeChartDefines.h to your project so that the constants are properly defined?
It works fine for me here using v7.0.1.2. Have you added TeeChartDefines.h to your project so that the constants are properly defined?
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 |
Hi, Narcís,
I just upgraded to 7.0.1.2 and it still didn't work. I have included the TeeChartDefines.h.
And there is one more problem. After I upgraded, the function CValueList::SetName is missing and there is a compiler error. I met the problem before when I upgraded from 7.0.0.8 and it turned out to be the TeeChart version slightly out of sync with the latest Library revision. http://www.teechart.net/support/viewtop ... c&start=15. Would you please help me check if there is still the problem? Otherwise, how come the CValueList::SetName is missing when it should be included?
Thank you very much!
David
I just upgraded to 7.0.1.2 and it still didn't work. I have included the TeeChartDefines.h.
And there is one more problem. After I upgraded, the function CValueList::SetName is missing and there is a compiler error. I met the problem before when I upgraded from 7.0.0.8 and it turned out to be the TeeChart version slightly out of sync with the latest Library revision. http://www.teechart.net/support/viewtop ... c&start=15. Would you please help me check if there is still the problem? Otherwise, how come the CValueList::SetName is missing when it should be included?
Thank you very much!
David
Hi David,
sorry for delay, using the latest v7.012 you should be able to accomplish it with the following code (here it's working fine) :
sorry for delay, using the latest v7.012 you should be able to accomplish it with the following code (here it's working fine) :
Code: Select all
void CChangePointerStylesDlg::OnOnGetSeriesPointerStyleTchart1(long SeriesIndex, long ValueIndex, long FAR* AStyle)
{
if (ValueIndex > 2)
*AStyle=psCircle;
else
*AStyle=psRectangle;
}
Yes, I've noticed that the header files still not sync in the latest maintenance, to update them please do the steps explained in the thread that you post here.Would you please help me check if there is still the problem?
Pep Jorge
http://support.steema.com
http://support.steema.com
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi David,
I've sent you a forums private message with the e-mail address where you can send the project.
I've sent you a forums private message with the e-mail address where you can send the project.
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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi David,
Thanks for the project.
The problem is that the OnGetSeriesPointerStyle event is not fired because you are using FastLine series. FastLine series doesn't have Pointer property and therefore this event can't be fired.
For your project to work you should use Line series instead of FastLine series and set its pointer to visible. This code works:
Thanks for the project.
The problem is that the OnGetSeriesPointerStyle event is not fired because you are using FastLine series. FastLine series doesn't have Pointer property and therefore this event can't be fired.
For your project to work you should use Line series instead of FastLine series and set its pointer to visible. This code works:
Code: Select all
void CSeriesShapeDlg::Chart1Init()
{
InitChartCommon(m_chart1);
m_chart1.GetHeader().GetText().Clear();
//m_chart1.AddSeries(scFastLine);
m_chart1.AddSeries(scLine);
m_chart1.Series(0).GetAsLine().GetPointer().SetVisible(true);
}
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 |