Python 如何更改仪表板尺寸?
我有一个小号的破折号 如何更改短划线大小或父div大小?我使用了示例中的一个简单用法,它正常工作。但我的新短跑有尺寸问题Python 如何更改仪表板尺寸?,python,django,plotly-dash,Python,Django,Plotly Dash,我有一个小号的破折号 如何更改短划线大小或父div大小?我使用了示例中的一个简单用法,它正常工作。但我的新短跑有尺寸问题 [enter image description here][1] dash应用程序 import dash import dash_core_components as dcc import dash_html_components as html from django_plotly_dash import DjangoDash app = DjangoDa
[enter image description here][1]
dash应用程序
import dash
import dash_core_components as dcc
import dash_html_components as html
from django_plotly_dash import DjangoDash
app = DjangoDash('SimpleExample') # replaces dash.Dash
app.layout = html.Div(children=[
html.H1(children='Hello Dash'),
html.Div(children='''
Dash: A web application framework for Python.
'''),
dcc.Graph(
id='example-graph',
figure={
'data': [
{'x': [1, 2, 3], 'y': [4, 1, 2], 'type': 'bar', 'name': 'SF'},
{'x': [1, 2, 3], 'y': [2, 4, 5], 'type': 'bar', 'name': u'Montréal'},
],
'layout': {
'title': 'Dash Data Visualization'
}
}
)]) if __name__ == '__main__':
app.run_server(debug=True)
views.py
from django.shortcuts import render
from django.http import HttpResponse
from . import plotly_app
def index(request):
return render(request, "index.html")
一些重要的设置
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'newtry',
'django_plotly_dash.apps.DjangoPlotlyDashConfig',]
父div的默认大小为0。
我使用了许多图形,大小为0。
我认为它可以取决于简单的使用大小形式。但我不能改变这个
父div的高度为:0;父div的默认高度为0