family tree diagram/chart/graph

309 views
Skip to first unread message

Miki

unread,
Dec 22, 2019, 8:30:30 AM12/22/19
to MIT App Inventor Forum
Hi. 

I am doing an app where you can make your own family tree. My current problem is how to make family tree diagram.

I don't want diagram to be clickable. When you're adding a new person you put in family members and their relationships to the new person. And when you do that I want diagram to be automatically made and changed. 

How do I do diagram? 

Do I put imagesprites in canvas? The problem is I don't know how many imagesprites to put in. Do I put one in and save it and when I add people I just get imagesprite from saved data?

Do I do diagram in table arrangment? Again I don't know how many labels or buttons to put in. And how many rows and columns to set. Do I save one label and get it from TinyDB for each new person?

I tried google it with no success.

Thank you for your help.

Miki

SteveJG

unread,
Dec 22, 2019, 8:45:58 AM12/22/19
to mitappinv...@googlegroups.com
This is a continuation of your Forum discussion here https://groups.google.com/forum/#!profile/mitappinventortest/APn2wQcpmcxWhgQo62yLjQ0tOxv1BQdbBxPKjyHAJmbWUwJ18WD_V7ctaBds-cSZxtak6TyNqMkA/mitappinventortest/oW4lazmp-FE/Qrf94WC-BQAJ   Miki.

You googled it?    OK.    Strange you did not find this article https://en.wikipedia.org/wiki/Family_tree 

There are no App Inventor tutorials showing how to make a Family Tree app.  You might look for examples of other developer's efforts to develop 'something'   Go to Gallery, search for Family Tree and you find this

family tree.PNG



search for ancestors or genealogy and you might find more.  Will it be exactly what you want?    Only you know.  What have you tried?   Post what you have done so far and someone might be able to provide 
specific advice Miki.       To do what you want to do, you have to learn how to use the Canvas  and databases.  Have you read through the material below and done any AI tutorials?  If you had, you probably 
could answer your questions.   Simply, there is no tutorial; you have to learn to build the pieces of your Family Tree app and put them together.

An 'industry' standard genealogy format is GEDCOM  https://en.wikipedia.org/wiki/GEDCOM  .. this file format might be the way to structure your data base .

What you expect to do will be difficult for an experienced AI programmer,  extremely difficult for a beginner .   Here are some links to GooglePlay apps that might do what you want to do.  https://www.google.com/search?q=familly+tree+google+play&oq=familly+tree++google+play&aqs=chrome..69i57.13086j0j8&sourceid=chrome&ie=UTF-8   It might be useful to look at the type of displays these apps create to display genealogical information.   How to use the Canvas to display sprites and text on it is discussed Chapter 17. Creating Animated Apps  ; if you use a Table format, you can display information in rows.


Here are some resources to help you learn to use the AI2 tools  A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook   http://www.appinventor.org/book2 ... the links are at the bottom of the Web page.  The book 'teaches' users how to program with AI2 blocks.

There is a free programming course here http://www.appinventor.org/content/CourseInABox/Intro  and the aia files for the projects in the book are here:  http://www.appinventor.org/bookFiles  

How to do a lot of basic things with App Inventor are described here:  http://www.appinventor.org/content/howDoYou/eventHandling  .




SteveJG

unread,
Dec 22, 2019, 1:11:55 PM12/22/19
to MIT App Inventor Forum
Canvas or Table?  Something like this is possible.

Upper is Canvas/lower is 2 Tables, images and text side by side.  Perhaps you will program something more elegant!

FamilyTree.PNG

either method is going to present programming difficulties.  Easy to position graphically, very difficult to automatically  position using with the ability to change who the ME is.


Merry Christmas, Wesołych Świąt,  Feliz Navidad, God Jul, Joyeux Noel, Καλά Χριστούγεννα, Happy Christmas, Veseloho Rizdva, Prettige Kerstdagen, Frohe Weihnachten!, 성탄 축하 , Buon Natale,  聖誕快樂 ,  圣诞快乐,  Sretan Božić, C рождеством!,  عيد ميلاد مجيد

Good luck,
Steve


ABG

unread,
Dec 23, 2019, 5:14:19 PM12/23/19
to MIT App Inventor Forum
Showing the relations is the hardest part.
I settled on a ListView.
See attached.
ABG

Eve.PNG
genealogy_ABG.aia
Selected Relative Cain.PNG
Waldo son of adam.PNG
Adam (apocryphal).PNG
blocks.png
Cain.PNG
Designer.PNG

TimAI2

unread,
Dec 23, 2019, 5:56:34 PM12/23/19
to MIT App Inventor Forum
Is nice :)

Could show (say for Cain or Abel)

Father : Adam
Mother : Eve

and therefore...
Brother:
Sister:

Need to get gender in there, but then this becomes very difficult in this day and age.......

ABG

unread,
Dec 23, 2019, 6:10:03 PM12/23/19
to MIT App Inventor Forum
The list of relation types is declared in blocks,
but is open to customization, to allow other uses,

I chose simplicity.

ABG


TimAI2

unread,
Dec 23, 2019, 7:06:09 PM12/23/19
to MIT App Inventor Forum
:)
Reply all
Reply to author
Forward
0 new messages