plotly.R icon indicating copy to clipboard operation
plotly.R copied to clipboard

Add support for ggalt::geom_dumbbell.

Open trekonom opened this issue 5 years ago • 3 comments

This PR adds support for ggalt::geom_dumbbell and closes #1454 .

  • The implementation follows ggalt::GeomDumbbell.

  • Tooltips only show up if hovering over the points and differ for the left and right point. To this end I added a util function make_hovertext which overwrites the hovertext set by layers2traces.

  • I also added some tests and tried to add a visual test (which however failed when running the test while vdiffr::manage_cases showed me a successful doppelganger). Therefore the visual test is commented out in the test.

trekonom avatar Jun 01 '20 11:06 trekonom

Hi Carson. First. Sorry for messing up the commit history.

  • I folllowed your suggestions for simplifying the code, removing the duplicated code and renaming the variables.
  • After commiting I realized that I thereby introduced a bug. The latest commits fix this bug. I also added an addtional test to check that.
  • Finally I removed some code duplication by adding a function segement2path .

Best, Stefan

trekonom avatar Jun 06 '20 08:06 trekonom

I just added the visual tests to the PR. However, running the visual tests against the docker image failed with the message "there is no package called 'ggalt'". If I should guess ... this probably happens because ggalt is not included in the docker image.

trekonom avatar Jun 18 '20 08:06 trekonom

Ah, yea, let's add ggalt to Suggests in the DESCRIPTION file

cpsievert avatar Jun 18 '20 14:06 cpsievert