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
8
Medium Priority
?
379 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 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.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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

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

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!

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

636 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