戒指dash_daq.Gauge
输出太薄,如下图所示。
我想要更厚的戒指。我在'inspect element'下找不到css元素来增加环的厚度。我该怎么做?
只需创建一个 assets
文件夹并将您的 css
文件放在那里,例如“styles.css”,它工作正常(Dash v1.6.0)
样式.css:
circle {
stroke-width: 20px;
}
应用.py:
import dash
import dash_daq as daq
import dash_core_components as dcc
import dash_html_components as html
app = dash.Dash(__name__, assets_folder = 'assets', include_assets_files = True)
app.layout = html.Div([
daq.Gauge(
id='my-gauge',
label="Default",
value=6,
style={'display': 'block' }
),
dcc.Slider(
id='my-gauge-slider',
min=0,
max=10,
step=1,
value=5
),
])
@app.callback(
dash.dependencies.Output('my-gauge', 'value'),
[dash.dependencies.Input('my-gauge-slider', 'value')]
)
def update_output(value):
return value
if __name__ == '__main__':
app.run_server(debug=True)
我是一名优秀的程序员,十分优秀!