Solved

exclude null points in my calculation and series average

Posted on 2003-11-24
8
377 Views
Last Modified: 2010-04-05
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
Comment
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
  • Learn & ask questions
  • 4
  • 2
  • 2
8 Comments
 
LVL 2

Accepted Solution

by:
odissey1 earned 20 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.AddNull('');
     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

by:allie910
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

by:odissey1
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Expert Comment

by:allie109
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

by:odissey1
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

by:allie109
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

by:odissey1
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

by:allie910
ID: 9854855
odissey1,

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

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question