|
9 | 9 | import pandas as pd |
10 | 10 | from pandas.io.formats.style import Styler |
11 | 11 | import panel as pn |
12 | | -from panel.layout.gridstack import GridStack |
13 | 12 |
|
14 | 13 | import simdec as sd |
15 | 14 | from simdec.visualization import sequential_cmaps, single_color_to_colormap |
16 | 15 |
|
17 | 16 |
|
18 | 17 | # panel app |
19 | 18 | pn.extension("tabulator") |
20 | | -pn.extension("gridstack") |
21 | 19 |
|
22 | | -template = pn.template.MaterialTemplate( |
| 20 | +pn.config.sizing_mode = "stretch_width" |
| 21 | +pn.config.throttled = True |
| 22 | +font_size = "12pt" |
| 23 | +blue_color = "#4099da" |
| 24 | + |
| 25 | +template = pn.template.FastGridTemplate( |
23 | 26 | title="Simulation Decomposition Dashboard", |
24 | 27 | # logo="_static/logo.gif", |
25 | 28 | favicon="_static/favicon.png", |
|
28 | 31 | "Sensitivity Analysis, Visualization, Data Analysis, Auditing, " |
29 | 32 | "Factors priorization, Colorization, Histogram" |
30 | 33 | ), |
| 34 | + accent=blue_color, |
| 35 | + shadow=False, |
| 36 | + main_layout=None, |
31 | 37 | ) |
32 | 38 |
|
33 | | -pn.config.sizing_mode = "stretch_width" |
34 | | -pn.config.throttled = True |
35 | | -font_size = "12pt" |
36 | | -blue_color = "#0072b5" |
37 | | - |
38 | 39 |
|
39 | 40 | @pn.cache |
40 | 41 | def load_data(text_fname): |
@@ -398,35 +399,28 @@ def csv_data( |
398 | 399 | selector_n_bins, |
399 | 400 | dummy_color_pickers_bind, |
400 | 401 | color_pickers, |
401 | | - max_width=350, |
402 | 402 | sizing_mode="stretch_width", |
403 | 403 | ) |
404 | 404 |
|
405 | 405 | template.sidebar.append(sidebar_area) |
406 | 406 |
|
407 | 407 | # Main window |
408 | | -main_area = GridStack( |
409 | | - name="SimDec Analysis", sizing_mode="stretch_both", min_height=600 |
410 | | -) |
| 408 | +template.main[0:4, 0:6] = pn.panel(interactive_figure, loading_indicator=True) |
411 | 409 |
|
412 | | -main_area[0:3, 0:3] = pn.panel(interactive_figure, loading_indicator=True) |
413 | | - |
414 | | -main_area[0:3, 3:5] = pn.Column( |
| 410 | +template.main[0:4, 6:12] = pn.Column( |
415 | 411 | pn.pane.Markdown("## Scenarios", styles={"color": blue_color}), |
416 | 412 | pn.panel(interactive_tableau, loading_indicator=True), |
417 | 413 | ) |
418 | 414 |
|
419 | | -main_area[3:5, 3:5] = pn.Column( |
420 | | - pn.pane.Markdown("## Details on inputs' states", styles={"color": blue_color}), |
421 | | - pn.panel(interactive_tableau_states, loading_indicator=True), |
422 | | -) |
423 | | - |
424 | | -main_area[3:5, 0:2] = pn.Column( |
| 415 | +template.main[4:7, 0:4] = pn.Column( |
425 | 416 | pn.pane.Markdown("## Sensitivity Indices", styles={"color": blue_color}), |
426 | 417 | pn.panel(interactive_sensitivity_indices_table, loading_indicator=True), |
427 | 418 | ) |
428 | 419 |
|
429 | | -template.main.append(main_area) |
| 420 | +template.main[4:7, 6:12] = pn.Column( |
| 421 | + pn.pane.Markdown("## Details on inputs' states", styles={"color": blue_color}), |
| 422 | + pn.panel(interactive_tableau_states, loading_indicator=True), |
| 423 | +) |
430 | 424 |
|
431 | 425 | # Header |
432 | 426 | icon_size = "1.5em" |
|
0 commit comments