I would like to put links to other pages so that I can email someone a zip file with a bunch of different plotly pages that can link to each other. It seems like making absolute links is easy, but I am not sure what I am doing wrong with the relative link (I have checked that the relative link location is correct). The code below is the simplest example that shows what I am trying to do.
df = data.frame( xvals = c( 1, 2, 3 ), yvals = c( 1, 3, 2 ) ) p1 = ggplot( df, aes( x = xvals, y = yvals ) ) + geom_point() + labs( title = "Title\n\n" ) p2 = ggplotly( p1 ) %>% layout( title = list( text = "Title <a href = 'http://plotly.com'>Absolute link</a> <a href = '../Dir1/test.html'>Relative link</a>" ) ) saveWidget( p2, file = 'testlinks.html', libdir = 'Shiny', selfcontained = FALSE )
Here is a picture. The absolute link works, the relative link doesn’t.