Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

156
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda