Graphing help to get some reaction

I am very confused.... Why does this produce no plotting? What tiny (or blaring ) detail am I missing.
I am just relearning some old high school maths...ugh!! trying to put it to use after all those decades.

I simply generate a random sized list of randon integers, and then (attempt unsuccessfully) to a simple graph... however, I get nothing. The label fills up with all the numbers from the list, but no drawings of lines, spot, circles...

please help a math noob...


I would start by looking at the circled blocks.

Instead of trying to set Canvas Height and Width,
just leave them as is (fill Parent) and normalize your plot points to fit inside those values when you plot them.

set x = (original x / maximum x ) * Canvas1.Width
set y = Canvas1.Height - (original y / maximum y ) * Canvas1.Height

Be aware that it takes a moment for Canvas Height and Width to 'take' when first displayed, so you don't want to measure them in Screen1.Initialize.


I always start with a fixed canvas size, and fixed points, then when I have this working, I focus on responsive sizing....

If the graph goes beyond the limits of the screen, I am guessing the data/space is lost to digital expulsion, as opposed to the screen/canvas scrolling merrily along, then, no? I tried setting it up in a Horizontal Scrolling Arrangement to no avail.

I did get it showing some data on the graph, but I went through a series of changing colours before I saw it. I also realized I wasn't iterating 'x' in the pasted blocks above.
Is it possible to have a scrolling screen/plotting area? in case the data goes well beyond the limits of the screen?
I am changing the app to set up a definitive size. In the finished product there will be data entry prior to graphing, so the canvas will have time to establish itself, also the graphing will be optional. (Fuel usage, mileage cost tracking for business).

You can use a horizontal scrolling arrangement and a canvas wider than it.

Set the HSA to Fill parent
Set the Canvas to wider than the Screen width (e.g. 1000px)

The canvas will scroll to the right

1 Like

Hmm. I will try that again. Cheers

It does work... I think I may have inadvertently put in. Vertical scrolling arrangement... lol