Skip to content

[BUG] Annotations using log axis as reference #916

@orenbenkiki

Description

@orenbenkiki
dash (1.1.1)
dash-bootstrap-components (0.7.0)
dash-core-components (1.1.1)
dash-daq (0.1.7)
dash-html-components (1.0.0)
dash-renderer (1.0.0)
dash-table (4.1.0)

Describe the bug

Writing: Scattergl(x_array=[value], ..., layout=dict(..., annotations=[dict(x=value, xref='x', ...)]) will place the annotations directly on top of the marker, as expected.

Writing: Scattergl(x_array=[value], ..., layout=dict(..., xaxis=dict(type='log'), annotations=[dict(x=value, xref='x', ...)]) will not place the annotations directly on top of the marker.

Expected behavior

Adding type='log' to an axis should not require modifying the coordinates of annotations. If an annotation uses this axis as a reference, then the log function should be applied to its coordinate(s), in the same way it is applied to marker coordinate(s).

Workaround

Writing: Scattergl(x_array=[value], ..., layout=dict(..., xaxis=dict(type='log'), annotations=[dict(x=np.log10(value), xref='x', ...)]) will work.

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