AppSheet Charts

Hi, I am developing an app that plots the weight and age ( number of days old ) of a farm animal on a chart.

I created a Livestock table and a Weights table. The Weights table is referenced to the Livestock table. The weights are displayed inline ( selectable as chart view or table view ) in the Livestock detail view.

I need help with the following, please. I would like to display “ideal growth rate” data with the actual data of an anmimal on the line graph. In other words I would like to see 2 lines on the chart. Real weights and Ideal weights.

I have the ideal weights entered as a record in the Livestock table. So in essence I want to display 2 records of livestock at the same time. One as selected and one that is a formula.

I assume you want a chart similar to this?

This was created by having a Month, Ideal Weight column and an Actual Weight column. The Month column was set as the Label column in the AppSheet table to show as the label across the bottom of the chart. I then created a Chart type view defined as follows(Block1 = Ideal, Block2 = Actual):

Note that Charts within AppSheet are very basic. For more sophisticated or complicated charts, AppSheet is now supporting the integration of Google’s Data Studio. See the article below for more details.

Visualize your app data using Data Studio

3 Likes

Thank you, that is basically what I want to achieve with some added complications.

It seems to me that with the method you described there has to be an ideal weight and actual weight entered for every record.

I would like to have the ideal weights column as a VC in the Weights table that gets its weight data from the weights referenced to an ideal animal defined in the Livestock table.

If I try and do this I get a list of weights as a result in the VC column that cannot be used for the ideal weight in charts as it is not a number or decimal.

I hope this makes sense as it seems difficult to put the problem in words. Here is a visual that I hope will explain the need.

The user should be able to select any sheep and see it’s weight compared to the ideal sheep.

Correct! You would need to have both columns in the same table. You cannot show two tables on a single chart.

But consider this, once you have recorded the actual weight, how would you line that up on a chart with the ideal weight? Each lamb would have been born at different times so you can’t just line it up by date. And what if a weight measurement was skipped or otherwise “corrupted” somehow, you would be introducing complexities in trying to get the chart data aligned between the two tables.

Additionally, I think the Ideal weight information would be very good data, as a data point, to have when viewing the animals details. No need to go to another chart to look it up.

So, if it were me, I would WANT the Ideal weight data recorded along with the actual weight and would include that as a column in the animal details.

2 Likes

It would be impractical to have to calculate the ideal weight ( from printed or saved lookup table I assume ) and enter it while actually weighing animals. It would be better to have it calculated automatically.

On refelection it does seem like quite a complex problem. Mainly because the 2 sets of data to be compared might not have the same amount of rows or the same age in days for each entry. The problem is probably not in the scope of this Q&A as it is more concerned with the designing of the basic functionality of the app.

Thank you very much for your time and effort in any case.