Reputation: 109
When using Plotly (in python) with an indicator if the number is relatively big the number is rounded. How to avoid this (or at least control it)?
fig_ind_abs = go.Figure(go.Indicator(
mode="number+delta",
value=5222,
delta={'position': "top", 'reference': 5218}))
will show the following indicator
Any ideas?
Upvotes: 2
Views: 4742
Reputation: 6758
You need to format the indicator number. You should add {'valueformat':'f'}
to your code wherever you need float values.Reference
Full list of available customizations d3 format api
import plotly.graph_objects as go
go.Figure(go.Indicator(
mode="number+delta",
value=5222,
delta={'position': "top", 'reference': 5218, 'valueformat':'f'},
number = {'valueformat':'f'}
))
Upvotes: 7