Solved

exclude null points in my calculation and series average

Posted on 2003-11-24
8
372 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
  • 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
 

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
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…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

910 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now