datasketch / hgchmagic

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

Add vertical line from a desired point #116

Open CamilaAchuri opened 2 years ago

CamilaAchuri commented 2 years ago

http://jsfiddle.net/bpswt3tr/5/

in R:

highchart() %>% 
hc_chart(
  type = "line",
  events = list(
    load = JS("function () {

                    this.addSeries({
                        data: [{
                            x: 7,
                            y: 135.6,
                            marker: {
                                symbol: 'triangle'
                            }
                        }, {
                            x: 7,
                            y: 170,
                            marker: {
                                symbol: 'triangle-down'
                            }
                        }]

                    });
                }")
  )
) %>% 
  hc_add_series(
    data = list(
      list(1, 29.9),
      list(2, 71.5),
      list(3, 106.4),
      list(4, 110.2),
      list(5, 144.0),
      list(6, 176.0),
      list(7, 135.6),
      list(8, 148.5)
    )
  )