datasketch / hgchmagic

https://datasketch.github.io/hgchmagic/
Other
3 stars 7 forks source link

Add option to draw horizontal and vertical lines #88

Closed lenafm closed 3 years ago

lenafm commented 3 years ago

Add an option for adding horizontal and vertical lines (with style attributes that could be line_hor_position, line_hor_color, line_hor_width, line_hor_style)

    hc_yAxis(...,
             plotLines = list(list(value = line_hor_position, 
                              color = line_hor_color, 
                              width = line_hor_width,
                              dashStyle = line_hor_style))
    ) %>%
jpmarindiaz commented 3 years ago

@CamilaAchury we had this before in ggmagic, I guess we can add it again in github.com/datasketch/dsvizopts @lenafm Do you think one line would be enough? how should we go about when we want to add multiple lines?

lenafm commented 3 years ago

Maybe instead of what I suggested above the line_hor (and line_ver) params could be lists of lists so that multiple lines can be added. E.g. hgch_line_DatNum(..., line_hor = line_hor) where

line_hor <- list(list(value = value1, color = color1, width = width1, dashStyle = dashStyle1),
                   list(value = value2, color = color2, width = width2, dashStyle = dashStyle2))