def layout(): year_select = Select(title="Year:", value="2010", options=years) location_select = Select(title="Location:", value="World", options=locations) year_select.on_change('value', on_year_change) location_select.on_change('value', on_location_change) controls = HBox(children=[year_select, location_select]) layout = VBox(children=[controls, pyramid(), population()]) return layout
def layout(): date_select = DateRangeSlider(name="period", title="Period:", value=(start, end), bounds=(bounds_start, bounds_end), value_labels='show', range=(dict(days=1), None)) date_select.on_change('value', on_date_change) country_select = Select(title="Host Site Country:", value="World", options=country_choices) country_select.on_change('value', on_country_change) controls = VBoxModelForm(_children=[ Paragraph(text="Date Range"), Paragraph(text=""), # spacing hack Paragraph(text=""), date_select, country_select ]) vboxsmall = VBoxModelForm(_children=[controls, source_par]) hbox1 = HBox(children=[job_loc_plot_builder(), vboxsmall]) hbox2 = HBox(children=[weekday_builder(), jobtype_builder()]) layout = VBox(children=[hbox1, hbox2]) return layout