rstudio / dygraphs

R interface to dygraphs
http://rstudio.github.io/dygraphs
Other
364 stars 194 forks source link

Fix for hidden crosshairs + new option + new feature #224

Open tr8dr opened 5 years ago

tr8dr commented 5 years ago

Fix Crosshairs were hidden beneath any shading in a graph. This was due to the crosshair canvas being below the graph canvas. This was solved by changing the z-index, position type, and allowing events to pass through to lower canvas layers.

New Option Also added a color option to dyCrosshairs(), to allow users to change the color of the crosshair.

New Feature Added dyUpdate(session, id, data). This allows one to update an existing dygraph from shiny without rerendering the widget in the DOM. Added functionality in R, JS, and documentation.

przmv commented 5 years ago

LGTM!

Thanks, @tr8dr! Could you please also update the docs and the NEWS file?

tr8dr commented 5 years ago

I have adjusted the Rmd and html docs for the new functionality. I did not find a "news" file anywhere in the distribution however. Let me know if there is something additional to be updated here.

tr8dr commented 5 years ago

Let me know if you need additional changes. Have added a new feature to push data updates to an existing dygraph in the browser from R.

przmv commented 5 years ago

Hey, @tr8dr, sorry for the delay. Could you please submit separate pull request for the independent changes? It would make the reviewing process quicker and easier. Thanks!

tr8dr commented 5 years ago

hmm, if you need it this way, I would have to unwind the second set of changes and wait for you to integrate the first set and then do a pull on that integrated set and put those changes back in. Not sure if there is a magical way to do this in github.

przmv commented 5 years ago

@tr8dr FYI: https://glebbahmutov.com/blog/splitting-pull-request/

tr8dr commented 5 years ago

Thanks, I will take a look at the above on the weekend ...