python - 如何设置破折号指标图形的尺寸?
问题描述
我在卡片组件中实现了破折号指示器组件,它增加了卡片大小。我试图改变卡片的尺寸,但它只是隐藏了指标内容。如何减小图形的大小?指标代码:
@app.callback(Output("ind_pct_sales", "figure"),
Input('location_filter', 'value'))
def generate_ind_pct_sales(location_filter):
filtered_df = filter_dimension(df,location_filter) # filters the data set
pct_sales = (pct_sales(df=filtered_df))*100 # returns the measure
fig = go.Figure()
fig.add_trace(go.Indicator(
mode="number",
number={'suffix': "%"},
value=pct_wsales
))
return fig
解决方案
推荐阅读
- c++ - 如何更正这些 c++ 错误“无效转换”和“运算符不匹配”
- python - Django 渲染循环输出到模板
- javascript - 将函数结果设置为外部 javascript 文件上同一函数内的变量
- reactjs - React with Redux:子组件在 props 改变后不会重新渲染(即使它们不是浅相等的)
- java - 将 Firebase 图像 URI 共享给其他应用时共享失败?
- r - 如何用 R 创建聚类柱形图?
- javascript - 由于代码冲突,引导模式不会关闭
- python - 更新存储在数据库中的数据(python+ Beautiful Soup+mysql)
- ssl - http -> https 之后 nginx 没有找到静态内容
- ios - 声音在 iPhone 上播放,但不在模拟器中