Bar graphs

221 views
Skip to first unread message

Paul Bowers

unread,
Sep 15, 2022, 8:53:16 AM9/15/22
to Sailforms Users
I have been playing with a way to create a bar graph on the main form.
Creating a horizontal form turned out to be quite easy
But creating a vertical one presents some challenges fighting with scroll bars
And the such. Anyway i though i would share what i have so far.

You can call the form and set the field title, l1 through l6SmartSelect_20220915-125908_Pro.jpg as labels and v1 
Through v6 as to bar values before going to form.

Enjoy


Bar_Graph_Example_1.sfg

HARVEY ARIZA

unread,
Oct 8, 2022, 11:18:47 PM10/8/22
to Sailforms Users

I find the proposed concept very interesting, the idea can be functional, greetings.

Paul Bowers

unread,
Aug 2, 2023, 6:16:48 AM8/2/23
to Sailforms Users
SmartSelect_20230802-111238_Pro.jpg

I have embedded my bargraph feature into my utility bill tracker app. Below it is a static table built of input boxes aligned to give a grid impression. This shows the legend for the bargraph above. Scroll is therefore under the control of the form and not the user, so always shows the entries required etc. 

Paul Bowers

unread,
Oct 21, 2025, 1:08:03 PMOct 21
to Sailforms Users
Creating horizontal bar graph are easy. Setting a char bar length in a text field. But there comes a time 
when you need a good old vertical Graph. Aggregate multiple records into a single record and creating
A vertical Graph can be quite complex, and i need a repeatable function i could call to do it over and over again. 

Creating a procedure that can recurse and loop is also potentially an issue in sailforms as could be
P passing parms in and results out. 

Passing parms is solvable using global variables. 
Loops were a bit more of a challenge. But solved with aloop table, containing a single whole number
With a record for each loop call you need. 

The attached example shows how to make procedure into functions. It had two global variables
Row (a number that passed between the main control procedure and the need loop procedure, the serving
Being graph a text variable where the resulting graph is returned for you to do what ever you need.)

There is a demo form which show how to use the procedure function. It also has a foreground demo 
 but it's not practical for repeated batch calls.

I have used this same technique to create calender month views etc

Enjoy.
Screenshot_20251021_175242_Pro.jpg
Vertical_Graph.sfg
Screenshot_20251021_175201_Pro.jpg
Screenshot_20251021_175227_Pro.jpg
Reply all
Reply to author
Forward
0 new messages