4
4
5
5
import dash_bootstrap_components as dbc
6
6
7
- import dash_core_components as dcc
8
-
9
- import dash_html_components as html
10
-
11
7
import plotly .express as px
12
8
13
9
import pynch .mass_table as mt
@@ -91,7 +87,7 @@ def update_graph(y_var, x_value, year):
91
87
template = "plotly_dark" ,
92
88
)
93
89
94
- title = html .H2 (f"A = { x_value } " )
90
+ title = dash . html .H2 (f"A = { x_value } " )
95
91
96
92
min_a = df_f ["A" ].min ()
97
93
max_a = df_f ["A" ].max ()
@@ -112,10 +108,10 @@ def update_graph(y_var, x_value, year):
112
108
year_and_variable = dbc .Row (
113
109
[
114
110
dbc .Col (
115
- html .Div (
111
+ dash . html .Div (
116
112
[
117
- html .H3 ("Year" ),
118
- dcc .Slider (
113
+ dash . html .H3 ("Year" ),
114
+ dash . dcc .Slider (
119
115
id = "year_slider" ,
120
116
min = 0 ,
121
117
max = len (table_years ) - 1 ,
@@ -126,10 +122,10 @@ def update_graph(y_var, x_value, year):
126
122
)
127
123
),
128
124
dbc .Col (
129
- html .Div (
125
+ dash . html .Div (
130
126
[
131
- html .H3 ("Value to plot" ),
132
- dcc .Dropdown (
127
+ dash . html .H3 ("Value to plot" ),
128
+ dash . dcc .Dropdown (
133
129
id = "yaxis_dropdown" ,
134
130
options = [{"label" : i , "value" : i } for i in variables ],
135
131
value = variables [7 ],
@@ -143,17 +139,17 @@ def update_graph(y_var, x_value, year):
143
139
a_slider = dbc .Row (
144
140
dbc .Col (
145
141
[
146
- html .Div (id = "graph-title" , children = []),
147
- html .Div (dcc .Slider (id = "xval_slider" , value = 50 )),
142
+ dash . html .Div (id = "graph-title" , children = []),
143
+ dash . html .Div (dash . dcc .Slider (id = "xval_slider" , value = 50 )),
148
144
]
149
145
)
150
146
)
151
147
152
148
graphs = dbc .Row (
153
149
[
154
- dbc .Col (dcc .Graph (id = "n-graph" , figure = {}), width = 3 ),
155
- dbc .Col (dcc .Graph (id = "a-graph" , figure = {}), width = 6 ),
156
- dbc .Col (dcc .Graph (id = "z-graph" , figure = {}), width = 3 ),
150
+ dbc .Col (dash . dcc .Graph (id = "n-graph" , figure = {}), width = 3 ),
151
+ dbc .Col (dash . dcc .Graph (id = "a-graph" , figure = {}), width = 6 ),
152
+ dbc .Col (dash . dcc .Graph (id = "z-graph" , figure = {}), width = 3 ),
157
153
]
158
154
)
159
155
0 commit comments