Solved

exclude null points in my calculation and series average

Posted on 2003-11-24
8
371 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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
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…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

708 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

18 Experts available now in Live!

Get 1:1 Help Now