Different values on dropdown

for drop downs you can provide any iterable of strings or, like you’ve done, an iterable of tuples where each tuple is a key, value pair.

the following code will give you just the years in the dropdown items

self.start_year.items = set(row['Ano'] for row in app_tables.iap_table.search())

You’d then want to handle the change event to display the graph correctly

def start_year_change(self, **event_args):
  year = self.start_year.selected_value
  ...

1 Like