Skip to content

Commit 74f46e8

Browse files
Add files via upload
Signed-off-by: Fabiana ⚡️ Campanari <113218619+FabianaCampanari@users.noreply.github.com>
1 parent e3ae41f commit 74f46e8

3 files changed

Lines changed: 58 additions & 0 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import dash
2+
from dash import html
3+
4+
app = dash.Dash(__name__)
5+
6+
app.layout = html.Div([
7+
html.H1("Meu Primeiro App Dash"),
8+
html.P("Criando layout básico com Dash")
9+
])
10+
11+
if __name__ == "__main__":
12+
app.run(debug=True)
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
from dash import dcc
2+
import dash
3+
from dash import html
4+
5+
app = dash.Dash(__name__)
6+
7+
app.layout = html.Div([
8+
html.H1("Exemplo de Layout com Gráfico"),
9+
dcc.Graph(
10+
id="example-graph",
11+
figure={
12+
"data": [
13+
{"x": [1, 2, 3], "y": [4, 1, 2], "type": "bar", "name": "SF"}
14+
],
15+
"layout": {"title": "Gráfico Simples"},
16+
},
17+
),
18+
])
19+
20+
21+
if __name__ == "__main__":
22+
app.run(debug=True)
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
from dash import dcc
2+
import dash
3+
from dash import html
4+
from dash import Input, Output
5+
6+
app = dash.Dash(__name__)
7+
8+
app.layout = html.Div([
9+
html.H1("Programando o Callback"),
10+
dcc.Input(id="input-text", value="Escreva algo...", type="text"),
11+
html.Div(id="output-text"),
12+
])
13+
14+
15+
@app.callback(
16+
Output("output-text", "children"),
17+
Input("input-text", "value"),
18+
)
19+
def update_output(value):
20+
return f"Você escreveu: {value}"
21+
22+
23+
if __name__ == "__main__":
24+
app.run(debug=True)

0 commit comments

Comments
 (0)