Skip to content

box plot not formatting correctly tickformat for timedelta #3729

@riodda

Description

@riodda

Hi, i'm doing a box plot were the Y axis is a timedelta value (laptime of a car).
with the following code:

Title = "Portimao DTM Speedtrap"
event['CAR_NUMBER'] = event['NUMBER'].map(str)
fig = px.box(event, x='TOD_MIN', y="LAP_TIME", color = "MANUFACTURER", points="all",template="simple_white", title=Title)
fig.update_xaxes(showgrid=True, tickformat = '%M:%S.%2f',ticklen = 8,showline=True, linewidth=2, linecolor='black', mirror=True)
fig.update_yaxes(showgrid=True, showline=True, linewidth=2, linecolor='black', mirror=True)
fig.show()

Were LAP_TIME is a time delta column.

as you can see the LAP_TIME is shown as 108B 107B etc, while the tickformat should be formatting as 1:48.000.
Removing ticklen don't affect the display.

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions