Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #10402

Re: "Stupid" Array Question - Graph4VO

Path csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From "Wolfgang Riedmann" <wriedmann@gmail.com>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: "Stupid" Array Question - Graph4VO
Date Fri, 7 Apr 2017 20:11:34 +0200
Lines 71
Message-ID <ekq32qF43m5U1@mid.individual.net> (permalink)
References <0c0ba76b-82c8-4ac1-b82d-0b1040960660@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 8bit
X-Trace individual.net g2ahVtGqCyNW05xAyij6og1QaddYOmCvtsBC/7T5EeDhkEhk4=
Cancel-Lock sha1:f6dMeAiNMTQHNpme4Bj63xqKzVU=
User-Agent XanaNews/1.18.1.6
Xref csiph.com comp.lang.clipper.visual-objects:10402

Show key headers only | View raw


Hi Michael,

I don't know Graph4VO, but I would try

AAdd(aPoints,{j,db:Value}) 

instead of

AAdd(aPoints,{{j,db:Value}}) 


(add only one array instead of a nested array)

Wolfgang




beerhand wrote:

> Started to look at the Graph4VO library and it looks really good.
> BUT, I am struggling to fill the array with data from a dbserver. I
> fully understand that this might be/are basic programming skills,
> nevertheless reading the manual doesn't help.
> 
> 
> This is from the lineChart example how the data is filled with static
> data:
> 
> aPoints := {}
> 
> AAdd(aPoints,{{01,550},{02,800},{03,700},{04, 900},{05,910},{06,820},;
>               {07,450},{08,330},{09,120},{10,120},{11,180},{12,360}})
> //Line 1
> AAdd(aPoints,{{01,550},{02,660},{03,720},{04,1010},{05,880},{06,760},;
> {07,400},{08,300},{09, 80},{10, 80},{11,170},{12,290}}) //Line 2
> AAdd(aPoints,{{01,500},{02,600},{03,690},{04,1030},{05,840},{06,620},;
> {07,350},{08,290},{09, 60},{10, 60},{11,150},{12,240}}) //Line 3
> AAdd(aPoints,{{01,300},{02,590},{03,600},{04,
> 800},{05,700},{06,500},;               {07,300},{08,210},{09,
> 10},{10, 10},{11,130},{12,200}}) //Line 4
> 
> I need to loop through my database and fill only 1 line (Start-Year
> to End-Year.
> 
> It is a simple 1 LineChart:
> x Axis = number of Years (e.g. 2017 to 2065)
> y Axis = Value in €
> 
> ***************
> j:= 1
> db:GoTop()
> For i := Db:StartYear to db:EndYear
>  
>  AAdd(aPoints,{{j,db:Value}}) 
>                            //this does not work as I believe in every
> loop a                            //new "Line" is created and result
> are single                            //points. So they need to be
> added to the                            //1 line i need.
> 
>  db:Skip()
>  j := j+1
> Next i
> 
> Thanks,
> Michael



-- 

Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

"Stupid" Array Question - Graph4VO beerhand <michael_j_schmidt@yahoo.de> - 2017-04-07 10:38 -0700
  Re: "Stupid" Array Question - Graph4VO "Wolfgang Riedmann" <wriedmann@gmail.com> - 2017-04-07 20:11 +0200
    Re: "Stupid" Array Question - Graph4VO beerhand <michael_j_schmidt@yahoo.de> - 2017-04-07 11:41 -0700
  Re: "Stupid" Array Question - Graph4VO "Gerhard Bunzel" <g.bunzel@domonet.de> - 2017-04-07 21:39 +0200
    Re: "Stupid" Array Question - Graph4VO beerhand <michael_j_schmidt@yahoo.de> - 2017-04-07 13:18 -0700
      Re: "Stupid" Array Question - Graph4VO Karl Faller <mail_withoutthat_@_drei-f_andthat_.de> - 2017-04-07 22:41 +0200
        Re: "Stupid" Array Question - Graph4VO beerhand <michael_j_schmidt@yahoo.de> - 2017-04-08 00:41 -0700
  Re: "Stupid" Array Question - Graph4VO beerhand <michael_j_schmidt@yahoo.de> - 2017-04-08 08:08 -0700

csiph-web