Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

155
Views
Use different styles for each line in billboarder

I have a table with weekly data that I am comparing against a yearly target. I used to add the yearly target like this:

bb_y_grid(show = TRUE,
                  lines = list(list(value = 99, text = "Goal")))

This was a nice and simple solution, however the goals have shifted in 2022 so now I want to show 99 for x = 2021 and 98 for x = 2022. I could not find an option to limit the gridline to only show for a range of x.

My next idea was to add a line to my data. So I have 1 line for the real data and 1 line for the budget. This looks as follows:

enter image description here

However, I don't want to show the points for the budget line, only for the real data. My code is as follows:

billboarder() %>%
        bb_linechart(dt.Cycle(), mapping = bbaes(YearWeekCiclo, Perc, Type),
                     show_point = T, type = "line") %>%
        bb_x_axis(type = "category", tick = list(rotate = 90, width = 100), height = 90,
                  label = list(text = "Year-Week-Cycle", position = "outer-right")) %>%
        bb_y_axis(label = list(text = "Percentage", position = "outer-top"), max = 100) %>%
        bb_y_grid(show = TRUE) %>%
        bb_legend(show = FALSE)

My question: How can I add a second line to my graph with it's own styling

Note: If you are only familiar with using billboard.js in JavaScript but know a solution I can try to translate that back to R language myself if needed

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!