# -*- coding =>  utf-8 -*-
using Dash

external_stylesheets = ["https://codepen.io/chriddyp/pen/bWLwgP.css"]

app = dash(external_stylesheets=external_stylesheets)

app.layout = html_div([
    dcc_tabs([
        dcc_tab(label="Tab one", children=[
            dcc_graph(
                figure=Dict(
                    "data" =>  [
                        Dict("x" =>  [1, 2, 3], "y" =>  [4, 1, 2],
                            "type" =>  "bar", "name" =>  "SF"),
                        Dict("x" =>  [1, 2, 3], "y" =>  [2, 4, 5],
                         "type" =>  "bar", "name" =>  "Montréal"),
                    ]
                )
            )
        ]),
        dcc_tab(label="Tab two", children=[
            dcc_graph(
                figure=Dict(
                    "data" =>  [
                        Dict("x" =>  [1, 2, 3], "y" =>  [1, 4, 1],
                            "type" =>  "bar", "name" =>  "SF"),
                        Dict("x" =>  [1, 2, 3], "y" =>  [1, 2, 3],
                         "type" =>  "bar", "name" =>  "Montréal"),
                    ]
                )
            )
        ]),
        dcc_tab(label="Tab three", children=[
            dcc_graph(
                figure=Dict(
                    "data" =>  [
                        Dict("x" =>  [1, 2, 3], "y" =>  [2, 4, 3],
                            "type" =>  "bar", "name" =>  "SF"),
                        Dict("x" =>  [1, 2, 3], "y" =>  [5, 4, 3],
                         "type" =>  "bar", "name" =>  "Montréal"),
                    ]
                )
            )
        ]),
    ])
])

run_server(app, "0.0.0.0", debug=true)
