July 23, 2024, 09:40:27 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Simple graph

Started by Andy, March 02, 2021, 04:03:36 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andy

March 02, 2021, 04:03:36 AM Last Edit: March 02, 2021, 05:06:10 AM by Andy
Hi,

Well before I post my final version of the Hangman game, I just wanted to look at a simple graph since I'm using one in the game.

This example program uses my graph.inc file to create an initial graph, update it (move it along) and optionally clear it from the screen.

It's simple to use / write, and I thought someone might like this little utility.

This version is based on time e.g. whole minutes, but it could easily be modified
to update on a given value as well.

All you have to do is supply some values & colours, that it.

Andy.
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Brian

Andy,

I don't see the GraphFill variable doing anything to change the colour

Brian

Andy

You're right Brian,

I rushed to get it posted, and have changed the example program and include file now.

The example program should say (in the timer section):

IF UpDateGraph(w1,GraphOutline,GraphFill) = 100  'Update the graph

Thanks Eagle eyes!

Andy.
 :)
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Brian

Andy,

There was a small problem with Graph.inc, if you had AUTODEFINE "off" set

Brian

Andy

March 02, 2021, 05:08:24 AM #4 Last Edit: March 02, 2021, 07:02:30 AM by Andy
Thanks Brian,

GraphMaximum is now declared in the include file (now uploaded).

Think that fixes it (fingers crossed)...

Andy.
:)
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.