AddNullXY

TeeChart for ActiveX, COM and ASP
Post Reply
nefis
Newbie
Newbie
Posts: 62
Joined: Wed Oct 22, 2003 4:00 am
Location: chicago

AddNullXY

Post by nefis » Wed Dec 10, 2003 11:19 am

Hello,

how can i add a invisible point to series wich not affect scale of the chart?
I mean when i use something like

TChart1.Series(0).AddNullXY(Now, 0, "")

the chart is rescaled to accomodate the new 0 value. Since the visible values are in range, say, 1000-1200 the chart becomes indecipherable

nefis

Pep
Site Admin
Site Admin
Posts: 3273
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Wed Dec 10, 2003 12:01 pm

You could use the AddNull method :

TChart1.Series(0).AddNull ""

Josep Lluis Jorge
http://support.steema.com

nefis
Newbie
Newbie
Posts: 62
Joined: Wed Oct 22, 2003 4:00 am
Location: chicago

Post by nefis » Wed Dec 10, 2003 12:26 pm

Pep wrote:You could use the AddNull method :

TChart1.Series(0).AddNull ""

Josep Lluis Jorge
http://support.steema.com
it's not working. you coud try it by corresponding modification of the "Multiple Axes" project from TeeChart samples

SS
Newbie
Newbie
Posts: 27
Joined: Thu Nov 27, 2003 5:00 am
Location: Chicago

AddNullXY

Post by SS » Wed Dec 10, 2003 4:25 pm

To get around this we did two things.
1) if no non-null points previously in the series, once you have a good first point go back and update the value.

2) if other the previous value was not null then carry that value to the next null.

[Ex. if points 1 to 5 were value = 50 and point 6 is null then the value for point 6 use 50

-OR-
If points 1 to 5 were null and point 6 is value = 50 , go back and update points 1 to 5 to have a null value of 50]

nefis
Newbie
Newbie
Posts: 62
Joined: Wed Oct 22, 2003 4:00 am
Location: chicago

Re: AddNullXY

Post by nefis » Wed Dec 10, 2003 4:37 pm

9080016 wrote:To get around this we did two things.
1) if no non-null points previously in the series, once you have a good first point go back and update the value.

2) if other the previous value was not null then carry that value to the next null.
thanks, SS, it should work.
but I still hoping that there is a "normal" way to do it

nefis

nefis
Newbie
Newbie
Posts: 62
Joined: Wed Oct 22, 2003 4:00 am
Location: chicago

Post by nefis » Thu Dec 11, 2003 10:11 am

Pep,

i'm still hoping that there is a "normal" way to do it. Is there?
The problem with the solution offered by SS is that there is a possibility of situation when long sequence of NULL values in a series happens in the very beginning of the series. It spoils output of series with "regular" values showed with the same axis.

nefis

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Mon Dec 15, 2003 11:55 am

Hi -
i'm still hoping that there is a "normal" way to do it. Is there?
Mmm, well, neither AddNull() nor AddNullXY() offer the possibility of adding in a series point whose YValue is not associated with an axis.

The problem with the solution offered by SS is that there is a possibility of situation when long sequence of NULL values in a series happens in the very beginning of the series. It spoils output of series with "regular" values showed with the same axis.
OK. In this instance you will simply have to clear the series of all values and add in the Null values' YValue based on the data point YValue, no?
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

nefis
Newbie
Newbie
Posts: 62
Joined: Wed Oct 22, 2003 4:00 am
Location: chicago

Post by nefis » Tue Dec 16, 2003 9:08 am

Christopher Ireland wrote: OK. In this instance you will simply have to clear the series of all values and add in the Null values' YValue based on the data point YValue, no?
I could think of ways around the issue. But the most simple solution might be NOT USING NULL POINTS IN MAX/MIN CALCULATIONS. the only problem with the solution is how to separate "regular" values fom Nulls. Well, you could use say minimal or maximal value for double type ( 4.94065645841247E-324 or 1.79769313486231E+308) as value of Null constant

nefis

Post Reply