Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
Solved

exclude null points in my calculation and series average

Posted on 2003-11-24
Medium Priority
379 Views
Hi,

does anyone know how to exclude the null points from the calculation ?
I add some null points at the beginning of my chart (FastLine Series) but when I use

Chart1.Series[index].MaxYValue => I get 0 for my minimum Y value because of the null points I added... is there any way to exclude the null points ?

One more thing.... Is there any function to calculate the average of 1 series of my chart...??

thanks alot ^^
0
Question by:allie910
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points
• 4
• 2
• 2

LVL 2

Accepted Solution

odissey1 earned 60 total points
ID: 9814624
Hi allie910,

Actually 'Null' points differ only by color :). So if you check the color of the point, you will be able to omit those points in caclulations like

procedure TForm1.FormCreate(Sender: TObject);
var Av: double; //average
i, k: integer;
begin
Series1.FillSampleValues(10);
Series1.ValueColor[0]:=clNone;

Av:=0;
Nnul:=0;
for i:=0 to Series1.Count-1 do begin
if Series1.ValueColor[i]=clNone then
else begin
Av:= Av+Series1.Yvalues[i];
Inc(k) //count non-nil points

end;

//calculate average
Av:=Av / k;

Label1.Caption:=FloatToStr(Av);
end;

There is function to calculate average, but again - probably not in the standard Delphi package.
To check DblClick TChart -> in Chart Editor goto Series -> Add -> if you see Functions, go there.

Regards,
odissey1
P.S. 20 points for 2 questions???
0

Author Comment

ID: 9829201
Hi odissey1,

it's work just fine !! thank youuuu ^^

ps: sorry abt the points  that's my only points that i have ><'

thanks alot ;)
0

LVL 2

Expert Comment

ID: 9835448
Hi allie910,

Thank you for points. Regarding TeeChart, I really recommend you to post questions on on news://www.berneda.com. You will get unswers faster.

Regards,
<odissey1>
0

Expert Comment

ID: 9836227
Hi odissey1,

I tried to go to berneda... but i really cant find how I can post anyquestion there..... I can only browse the questions and the anwers
><'

0

LVL 2

Expert Comment

ID: 9839419
Hi allie910,

Like in any newsgroup. Make an account (set you nickname, and return address in Outlook or Netscape) -> compose message -> post.

Regards,
odissey1
0

Expert Comment

ID: 9847565
hi odissey1...

heheh sorry maybe this is sounds stupid, That's the problem ! I can't find the link where I can register os something like that.. I can only browse the question posted there
0

LVL 2

Expert Comment

ID: 9847938
Hi allie 910,

Ok, my guess you don't have IP address or e-mail account (like on library computers) on this computer. Say, if you use an Outlook Express, check if you can send e-mails using this Outlook Express. If you can - than you should be able to post messages on Network grous. If you unable to send e-mail - ask whoever around how to send e-mails from this computer.

Regards,
odissey1
0

Author Comment

ID: 9854855
odissey1,

ok than... thanks alot ;) I'll try =D

0

Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi projâ€¦
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy reâ€¦
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a qâ€¦
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrasâ€¦
Suggested Courses
Course of the Month11 days, 15 hours left to enroll