I've searched but not find anyone w this issue and thus no solution.
I've come to understand that you move the legend around with the legend
attribute:
layout(title = list(text = paste0('Arbetskraftsdeltagande och sysselsättningsgrad',
'<br>',
'<sup>',
'20-64 år','</sup>')),
margin = list(l = 50, r = 130, b = 50, t = 90),
# annotations = list(text = "Källa: Konjunkturinstitutet", xref='paper', yref='paper',
# x=1, y=-0.2, showarrow = F,
# font = list(size = 12)),
legend = list(x = 100, y = 0.5))
df_plotly
This works generally in other plots, I can move the legend all the way outside the plot, but with this facet_wrap plot it doesn't move all the way to the right as can be seen below:
It doesn't mather if I put x = 300, or increase margin space for r - no results. I guess it's beacuse the legend already is x to the right 100% - but apparently it's not? Changing y - is moving the legend, so the argument works as such.
-> Any ideas?
Let me know if you need to see more of the code.
Thanks in advance!