We have a Windows MS Access program - works fine - that I am going to port to Android that involves a graph (See below).
It seems like every time I write something in B4A I later find a far more elegant solution to whatever brute force attempt I made So I thought I would ask in advance and get advice from the pros.
What are your suggestions for the best way to draw the graph in B4A?
The important points are:
Points are added manually via keyboard
Red and yellow upper and lower limits are basically constant. The mean (Black Line may be skewed up or down if the upper and lower limits are not are not the same distance from the
The Green band and Blue line are recalculated each time a new point is entered.
Maximum display is 100 points but the user can select to display 10/20/50/100.
MY BIGGEST CONCERN: I need to be able to touch select any of the points and edit it. What I did in Access was ugly but worked. Since Access doesn't allow adding controls (views) at run time i put 100 hidden rectangle controls on the form and added an on click event for each one. I stored the database record ID in the tag property of each one when it was added to the graph. The upside of this was when redrawing I always known the order. Rect1, Rect2, etc. The downside, every time I redraw it involves re-getting the point information from the table (for speed I keep the active chart info in a local table). Each Point has 6 important pieces of data to be stored that are needed to modify it.
Should I store this in a local SQL table? OR create a data type with the information and store it in a list?
I welcome your thoughts and ideas!
It seems like every time I write something in B4A I later find a far more elegant solution to whatever brute force attempt I made So I thought I would ask in advance and get advice from the pros.
What are your suggestions for the best way to draw the graph in B4A?
The important points are:
Points are added manually via keyboard
Red and yellow upper and lower limits are basically constant. The mean (Black Line may be skewed up or down if the upper and lower limits are not are not the same distance from the
The Green band and Blue line are recalculated each time a new point is entered.
Maximum display is 100 points but the user can select to display 10/20/50/100.
MY BIGGEST CONCERN: I need to be able to touch select any of the points and edit it. What I did in Access was ugly but worked. Since Access doesn't allow adding controls (views) at run time i put 100 hidden rectangle controls on the form and added an on click event for each one. I stored the database record ID in the tag property of each one when it was added to the graph. The upside of this was when redrawing I always known the order. Rect1, Rect2, etc. The downside, every time I redraw it involves re-getting the point information from the table (for speed I keep the active chart info in a local table). Each Point has 6 important pieces of data to be stored that are needed to modify it.
Should I store this in a local SQL table? OR create a data type with the information and store it in a list?
I welcome your thoughts and ideas!
Last edited: