Hello,
I'm a little confused: in th following code segment (C++)
Serie1.FillSampleValues(20);
Serie1.GetAsContour().SetAutomaticLevels(true);
Serie1.GetAsContour().SetNumLevels(15);
long lNumLevels=Serie1.GetAsContour().GetNumLevels();
//
Serie1.GetAsContour().SetAutomaticLevels(false);
Serie1.GetAsContour().SetNumLevels(15);
lNumLevels=Serie1.GetAsContour().GetNumLevels();
"serie1" is a contour serie. I try to get the Number of contour levels. In the first case (SetAutomaticLevels(true) ) the function GetNumLevels() returns the correct value 15.
In the second case (SetAutomaticLevels(false)) the function GetNumLevels() returns 0.
What happens here, what I'm doing wrong?
Raimund
Levels in contour plots
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Raimund,
I'm afraid this is a bug. I've added it (TV52013723) to the defect list to be investigated for next releases.
I'm afraid this is a bug. I've added it (TV52013723) to the defect list to be investigated for next releases.
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 Raimund,
I've been investigating the issue now and found that if you set AutomaticLevels to false you need to create the levels before retrieving its value, for example:
So I don't consider this being a bug and therefore closed the issue in the defect list.
I've been investigating the issue now and found that if you set AutomaticLevels to false you need to create the levels before retrieving its value, for example:
Code: Select all
Private Sub Form_Load()
TChart1.Aspect.View3D = False
TChart1.AddSeries scContour
TChart1.Series(0).FillSampleValues 10
TChart1.Series(0).asContour.AutomaticLevels = False
TChart1.Series(0).asContour.Levels.AddLevel -1, clTeeColor
TChart1.Series(0).asContour.Levels.AddLevel -0.8, clTeeColor
TChart1.Series(0).asContour.Levels.AddLevel -0.6, clTeeColor
TChart1.Series(0).asContour.Levels.AddLevel -0.4, clTeeColor
TChart1.Series(0).asContour.Levels.AddLevel -0.2, clTeeColor
TChart1.Series(0).asContour.Levels.AddLevel 0, clTeeColor
TChart1.Series(0).asContour.Levels.AddLevel 0.2, clTeeColor
TChart1.Series(0).asContour.Levels.AddLevel 0.4, clTeeColor
TChart1.Series(0).asContour.Levels.AddLevel 0.5, clTeeColor
TChart1.Series(0).asContour.Levels.AddLevel 0.8, clTeeColor
TChart1.Header.Text.Clear
TChart1.Header.Text.Add CStr(TChart1.Series(0).asContour.NumLevels)
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 |