When plotting series using FastLine if you mark a plot as null it still draws a line from the Null point to the next valid point not showing a gap in the line. Where as when you switch the SeriesType to csLine there is no line from the NULL point to the next data value.
This problem, which is in TeeChart 6 with Null support in FastLine, is preventing us from updating a version of our product with significant performance increases. The original response misunderstood that the problem was with TeeChart 6, not 5, and it appears that the additional posts haven't been read because there's no other responses. Help! I've repeated the follow on responses below.
I have a .TEE file that I can send you that shows the problem. When I look at the file as fastline the line from the null point to the next valid point appears when it shouldn't. If I change the seriestype to csLine the issue is resolved. This only appears when there are more than 1 null points in a row.
I have placed a .TEE files out on steema.public.attachments.
Problem plotting FastLine with Nulls
Hello,
FastLine Series' goal is to be as fast as possible, it doesn't support Null points in the same way as a standard Line Series (ie. it plots up to the null point, not to/from) but gives you some options on how to rework them. If you are obtaining no null point so far, you should start by setting IgnoreNulls to False and you can decide how to deal with the nulls.
eg.
In the above example the Line between 1 and 3 (2 point span) is set to non-visible by setting the Y value of the last null to the y value of the following visible point. That may be a way to obtain what you require. Note that AddNullXY may be used or simply adding a point with the clNone colour.
An alternative would be to jump the gap entirely by adding just one Null point but by setting its value to the value of the following visible point. What you decide may depend on how you wish to interpret and work with the Chart.
Eg.
I hope that may be of help.
Regards,
Marc Meumann
Steema Support
FastLine Series' goal is to be as fast as possible, it doesn't support Null points in the same way as a standard Line Series (ie. it plots up to the null point, not to/from) but gives you some options on how to rework them. If you are obtaining no null point so far, you should start by setting IgnoreNulls to False and you can decide how to deal with the nulls.
eg.
Code: Select all
With TChart1
.Series(0).asFastLine.IgnoreNulls = False
.Series(0).asFastLine.AddRealTime 0, 3, "", clTeeColor
.Series(0).asFastLine.AddRealTime 1, 2, "", clTeeColor
'can use AddNullXY:
.Series(0).AddNullXY 2, 0, ""
.Series(0).AddNullXY 3, 4, ""
'or Color at clNone
.Series(0).asFastLine.AddRealTime 2, 0, "", clNone
.Series(0).asFastLine.AddRealTime 3, 4, "", clNone
.Series(0).asFastLine.AddRealTime 4, 2, "", clTeeColor
.Series(0).asFastLine.AddRealTime 5, 3, "", clTeeColor
End With
An alternative would be to jump the gap entirely by adding just one Null point but by setting its value to the value of the following visible point. What you decide may depend on how you wish to interpret and work with the Chart.
Eg.
Code: Select all
' visible point
.Series(0).asFastLine.AddRealTime 1, 2, "", clTeeColor
' non-visible point
.Series(0).asFastLine.AddRealTime 3, 4, "", clNone
' visible point
.Series(0).asFastLine.AddRealTime 3, 4, "", clTeeColor
Regards,
Marc Meumann
Steema Support
Problem Plotting FastLine with Nulls
Marc,
Your example shows the problem that we are having. I've created the example below to show you in more detail. The first chart uses fastline as you recommended, the second chart uses a line adding the same points. If you notice the problem is between points 3 and 4. If point 3 is null there should not be a line that is drawn from 3 to 4.
GRRRRR. Unfortunately this post will not take a copy of my code so I will have to put it out on the attachments news group.
Your example shows the problem that we are having. I've created the example below to show you in more detail. The first chart uses fastline as you recommended, the second chart uses a line adding the same points. If you notice the problem is between points 3 and 4. If point 3 is null there should not be a line that is drawn from 3 to 4.
GRRRRR. Unfortunately this post will not take a copy of my code so I will have to put it out on the attachments news group.
Hello Patrick,
I'll open this for discussion here. FastLine is intended as a high speed Series optimised for fast-paint. There are various enhancements implemented in the Line Series that do not exist for FastLine to keep FastLine processing to a minimum.
The behaviour has been by-design. The idea being that the plotted line of a point pertains to that point and the next line pertains to the next point, etc. It was designed as such although that was some time ago and before null points became available in FastLine, so a review is probably in order.
In the meantime I propose the workaround outlined in the earlier post.
Regards,
Marc Meumann
Steema Support
I'll open this for discussion here. FastLine is intended as a high speed Series optimised for fast-paint. There are various enhancements implemented in the Line Series that do not exist for FastLine to keep FastLine processing to a minimum.
The behaviour has been by-design. The idea being that the plotted line of a point pertains to that point and the next line pertains to the next point, etc. It was designed as such although that was some time ago and before null points became available in FastLine, so a review is probably in order.
In the meantime I propose the workaround outlined in the earlier post.
Regards,
Marc Meumann
Steema Support