Skip to content

directLabels clashing with reference line #344

@ONSSamBennett

Description

@ONSSamBennett

On charts with direct labels and reference line, direct labels are clashing with reference lines when values are too close together. In the horizontal bar direct label template I have applied a text shadow to all directLabels where the label is shown in grey/back at the end of the bar (text-shadow: -2px 0 white, 0 2px white, 2px 0 white, 0 -2px white). But this probably needs doing somewhere in the directLabels helper function.

See example of clashing labels here and labels with shadow here:
https://fa1rvwwsxx343.ons.statistics.gov.uk/visualisations/dvc3300-3399/dvc3374-estimates-of-very-old/archive/fig02-nolabelborder-referenceline/
https://fa1rvwwsxx343.ons.statistics.gov.uk/visualisations/dvc3300-3399/dvc3374-estimates-of-very-old/archive/fig02-referenceline/

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