Board index » delphi » Horizontal Bar Chart

Horizontal Bar Chart

Hi there

Does anyone know how to create a horizontal bar chart from an array?
In my array I have numbers in the range of 1 to 10.  Should I create a
varable for each number and then compare the array with that number or
is there a better way which uses loops?

Any help would be much appreciated.

Cheers,
Steve
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
          Steven A Richmond <blac...@beerhill.u-net.com>
   'Professionals  built  the  Titanic,  amateurs  built  the ark.'
         Ballymoney, Northern Ireland  -  PGP Key Available
      The Beerhill Web Pages: http://www.u-net.com/~beerhill/
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

 

Re:Horizontal Bar Chart


Quote
st...@beerhill.u-net.com (Steven Richmond) wrote:
>Does anyone know how to create a horizontal bar chart from an array?
>In my array I have numbers in the range of 1 to 10.  Should I create a
>varable for each number and then compare the array with that number or
>is there a better way which uses loops?

You'll have to consider each item in your array as one line, from top
to bottom.  Then you will have to arbitrarily set one unit to be so
many blocks, *'s or whatever you write.  Then set it up so you write,
say to use an example of 3 *'s per units in the array, if your unit is
4, be sure you write out 12 *'s...

Glenn Grotzinger
mailto:ggr...@2sprint.net
MOD and S3M user extraordinaire.
Writer of TP tutorial.  All released parts findable at:
ftp://garbo.uwasa.fi/pc/turbopas/tptutr0a.zip

Other Threads