block by timelyportfolio 80d85f78a5a975fa29d7

vertical lines and labels with nvd3 + rCharts

Full Screen

rCharts + nvd3 with vertical lines and labels

In response to this Stack Overflow question I thought it would be helpful to demonstrate one way to add vertical lines and labels to a nvd3 time series lineWithFocusChart. Hopefully it will help both the R rCharts and the straight Javascript nvd3 user. I solved a small syncing problem with the brushing by adding a window.setTimeout on brushend. It seems to work fairly well.

Please let me know if there might be a better way to handle.

rCharts viewer demo

rCharts live code example

R code

code.R