Skip to content

feat: add label to refOpts() - #527

Merged
jack-davison merged 1 commit into
mainfrom
refOpts-label
Jun 30, 2026
Merged

feat: add label to refOpts()#527
jack-davison merged 1 commit into
mainfrom
refOpts-label

Conversation

@jack-davison

Copy link
Copy Markdown
Collaborator

This PR adds the label and other arguments to refOpts(). It allows for direct labelling of reference lines.

daqi <- openair::importUKAQ(
  year = 2025, 
  source = "aurn", 
  data_type = "daqi", 
  pollutant = "o3"
)

daqi |> 
  dplyr::summarise(
    concentration = max(concentration, na.rm = T), 
    .by = date
  ) |>
  timePlot(
    cols = "black",
    "concentration",
    ref.y = refOpts(
      c(0, 101, 161, 241),
      color = c("#009900FF", "#ff9900FF", "#ff0000FF", "#990099FF"),
      label = c("Low", "Moderate", "High", "Very High")
    )
  )
image

@jack-davison
jack-davison merged commit 9788684 into main Jun 30, 2026
5 of 6 checks passed
@jack-davison
jack-davison deleted the refOpts-label branch June 30, 2026 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant