YouTip LogoYouTip

Dash First App

# Import Dash related libraries import dash from dash import dcc, html # dcc is Dash core components library, html is HTML components library # Create a Dash application instance app = dash.Dash( __name__ ) # Define the application layout app.layout= html.Div(children=[ # Add a title html.H1(children='Hello, Dash!'), # Add a description text html.Div(children=''' Dash: A Web Application Framework for Python. '''), # Add a chart dcc.Graph( id='example-graph',# Chart ID, used for callback functions figure={ 'data': [# Chart data {'x': [1,2,3],'y': [4,1,2],'type': 'bar','name': 'Shanghai'
← Dash Html ComponentDash Intro β†’