Hi,
I have a problem while zooming on area with null Values. Hereafter you can see all my charted values
Before Zoom:
After zoom on 18/11/10 -> 28/11/10 area
At the beginning (before zoom) the slope of the curve between 09/11/10: 46.11 and 22/11/10: 51.668 seems normal.
Just after zoom the slope changes significantly (between 18/11/10 -> 22/11/10) , because it links the value 0 of 18/11/10 with value 51.668 at 22/11/10.
I would like to have the same slope as the one between 09/11/10 and 22/11/10, because all values between these two dates are Null values ( added with ADDNULLXY function), and so 18/11/10 value of 0 should not be taken into account.
How should I proceed?
Thanks
Petar
Zoom on null values
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Zoom on null values
Hi Petar,
I see your bottom axis is zoomed but not your left axis. Do you only have horizontal zoom enabled? Code snippet below doesn't produce such a chart for me here. If I zoom around 18th November I don't get the first segment painted:
Is this what you expected? Which TeeChart version are you using? Could you please modify code snippet below so that we can reproduce the problem here?
Thanks in advance.
I see your bottom axis is zoomed but not your left axis. Do you only have horizontal zoom enabled? Code snippet below doesn't produce such a chart for me here. If I zoom around 18th November I don't get the first segment painted:
Is this what you expected? Which TeeChart version are you using? Could you please modify code snippet below so that we can reproduce the problem here?
Code: Select all
Private Sub Form_Load()
TChart1.Aspect.View3D = False
TChart1.Axis.Bottom.Labels.DateTimeFormat = "dd/mm/yy"
TChart1.AddSeries scLine
TChart1.Series(0).asLine.TreatNulls = tnSkip
TChart1.Series(0).XValues.DateTime = True
TChart1.Series(0).AddXY CDate("8 / 11 / 2010"), 46.494, "", clTeeColor
TChart1.Series(0).AddXY CDate("9 / 11 / 2010"), 46.11, "", clTeeColor
TChart1.Series(0).AddNullXY CDate("10 / 11 / 2010"), 0, ""
TChart1.Series(0).AddNullXY CDate("11 / 11 / 2010"), 0, ""
TChart1.Series(0).AddNullXY CDate("12 / 11 / 2010"), 0, ""
TChart1.Series(0).AddNullXY CDate("15 / 11 / 2010"), 0, ""
TChart1.Series(0).AddNullXY CDate("16 / 11 / 2010"), 0, ""
TChart1.Series(0).AddNullXY CDate("17 / 11 / 2010"), 0, ""
TChart1.Series(0).AddNullXY CDate("18 / 11 / 2010"), 0, ""
TChart1.Series(0).AddNullXY CDate("19 / 11 / 2010"), 0, ""
TChart1.Series(0).AddXY CDate("22 / 11 / 2010"), 51.668, "", clTeeColor
TChart1.Series(0).AddXY CDate("23 / 11 / 2010"), 50.363, "", clTeeColor
TChart1.Series(0).AddXY CDate("24 / 11 / 2010"), 51.2, "", clTeeColor
TChart1.Series(0).AddXY CDate("25 / 11 / 2010"), 50.25, "", clTeeColor
TChart1.Series(0).AddNullXY CDate("26 / 11 / 2010"), 0, ""
TChart1.Series(0).AddXY CDate("29 / 11 / 2010"), 52.15, "", clTeeColor
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: Zoom on null values
Hi Narcis,
I forgot to precise that I'm using fastlines. I'm using version 8 of TeeChart. You can check this code:
Thanks,
Petar
I forgot to precise that I'm using fastlines. I'm using version 8 of TeeChart. You can check this code:
Code: Select all
Private Sub Form_Load()
TChart1.Aspect.View3D = False
TChart1.Axis.Bottom.Labels.DateTimeFormat = "dd/mm/yy"
TChart1.AddSeries (scFastLine)
TChart1.Series(0).asFastLine.TreatNulls = tnSkip
TChart1.Series(0).XValues.DateTime = True
TChart1.Series(0).AddXY CDate("8 / 11 / 2010"), 46.494, "", clTeeColor
TChart1.Series(0).AddXY CDate("9 / 11 / 2010"), 46.11, "", clTeeColor
TChart1.Series(0).AddNullXY CDate("10 / 11 / 2010"), 0, ""
TChart1.Series(0).AddNullXY CDate("11 / 11 / 2010"), 0, ""
TChart1.Series(0).AddNullXY CDate("12 / 11 / 2010"), 0, ""
TChart1.Series(0).AddNullXY CDate("15 / 11 / 2010"), 0, ""
TChart1.Series(0).AddNullXY CDate("16 / 11 / 2010"), 0, ""
TChart1.Series(0).AddNullXY CDate("17 / 11 / 2010"), 0, ""
TChart1.Series(0).AddNullXY CDate("18 / 11 / 2010"), 0, ""
TChart1.Series(0).AddNullXY CDate("19 / 11 / 2010"), 0, ""
TChart1.Series(0).AddXY CDate("22 / 11 / 2010"), 51.668, "", clTeeColor
TChart1.Series(0).AddXY CDate("23 / 11 / 2010"), 50.363, "", clTeeColor
TChart1.Series(0).AddXY CDate("24 / 11 / 2010"), 51.2, "", clTeeColor
TChart1.Series(0).AddXY CDate("25 / 11 / 2010"), 50.25, "", clTeeColor
TChart1.Series(0).AddNullXY CDate("26 / 11 / 2010"), 0, ""
TChart1.Series(0).AddXY CDate("29 / 11 / 2010"), 52.15, "", clTeeColor
End Sub
Petar
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Zoom on null values
Hi Petar,
The only solution I can think of is adding more intermediate points as a smoothing function would:
However, smoothing function ignores null values so you should add intermediate points to your data.
The only solution I can think of is adding more intermediate points as a smoothing function would:
Code: Select all
TChart1.AddSeries scFastLine
TChart1.Series(1).SetFunction tfSmoothing
TChart1.Series(1).DataSource = TChart1.Series(0)
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: Zoom on null values
Thank you for the solution, I think that we'll rather use the last non-null value.
Thanks,
Petar
Thanks,
Petar