Skip to content
This repository has been archived by the owner on Oct 10, 2023. It is now read-only.

Commit

Permalink
scalar plotly hack
Browse files Browse the repository at this point in the history
  • Loading branch information
39bytes authored and itsjoeoui committed Aug 29, 2023
1 parent ad932c7 commit 851583d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion flojoy/plotly_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ def data_container_to_plotly(data: DataContainer) -> dict[str, Any] | None:
case "Scalar":
fig.add_trace(
go.Indicator(
value=data_copy.c,
value=data_copy.c
if isinstance(data_copy.c, float)
else data_copy.c[0],
domain={"y": [0, 1], "x": [0, 1]},
number={"valueformat": "f"},
)
Expand Down

0 comments on commit 851583d

Please sign in to comment.