Progress.
I have now managed to chart mood_types. Although this seems extremely convoluted. Any possible suggestions for improving the code would be very gratefully received.
I don’t seem to be using any server code at all (I didn’t understand the multi-row furniture example above).
#this get me a happy counts variable...
happy_counts = app_tables.mood_types_table.get(mood_types="happy")
happy_notes = app_tables.mood_journal.search(mood_types=happy_counts)
hppy = len(happy_notes)
#neutral
neutral_counts = app_tables.mood_types_table.get(mood_types="neutral")
neutral_notes = app_tables.mood_journal.search(mood_types=neutral_counts)
ntrl = len(neutral_notes)
#sad
sad_counts = app_tables.mood_types_table.get(mood_types="sad")
sad_notes = app_tables.mood_journal.search(mood_types=sad_counts)
sd = len(sad_notes)
#desperate
desperate_counts = app_tables.mood_types_table.get(mood_types="desperate")
desperate_notes = app_tables.mood_journal.search(mood_types=desperate_counts)
dsprt = len(neutral_notes)
#this plots the 4 moods
self.plot_mood_counts.data = go.Bar(y=[hppy,ntrl,dsprt,sd])