I solved it by my own my only problem is to change the column header depending on the year i choosed for the column. I think i need an separate output for each
this is the code for the headers of each column:
dash_table.DataTable(
id=‘datatable-interactivity’,
columns=[
{“name” : “KW”, “id” : “KW”},
{“name” : ‘Anzahl’+" “+”%s" %year_picker_1, “id”: ‘Anzahl1’},
{“name” : ‘Umsatz’+" “+”%s" %year_picker_1, ‘id’ : ‘Umsatz1’},
{“name” : ‘Anzahl’+" “+”%s" %year_picker_2, “id”: ‘Anzahl2’},
{“name” : ‘Umsatz’+" “+”%s" %year_picker_2, ‘id’ : ‘Umsatz2’},
{“name” : ‘Anzahl’+" “+”%s" %year_picker_3, “id”: ‘Anzahl3’},
{“name” : ‘Umsatz’+" “+”%s" %year_picker_3, ‘id’ : ‘Umsatz3’},
{“name” : ‘Anzahl’+" “+”%s" %year_picker_4, “id”: ‘Anzahl4’},
{“name” : ‘Umsatz’+" “+”%s" %year_picker_4, ‘id’ : ‘Umsatz4’}
can i return values from a callback function without an Output(id, and value?)
and i need only to return the data for the table (is working) and the values from the year_picker (not working)
this is my current Callback:
Output('datatable-interactivity', 'data'),
[Input('year_picker_1', 'value'),
Input('year_picker_2', 'value'),
Input('year_picker_3', 'value'),
Input('year_picker_4', 'value')]
but i need to return the year picker values too, to name the the column headers with the selected your of the dropdown above…
many thanks in advance