问题
In my flexdashboard I used "plotly" library to plot the graph. when the data is refreshing at that time the bar size get reduced. At that time when I clicked on "autoscale" option then it is working fine. My question is can we enable autoscale automatically by any option in plotly.r code ?
回答1:
Try setting autorange = TRUE
for both the x- and y-axis in the layout
option.
This solved the issue for me.
Example:
plot_ly(x, y, type = "bar") %>%
layout(xaxis = list(autorange = TRUE),
yaxis = list(autorange = TRUE))
For other plotly axes modifications in R check this page.
来源:https://stackoverflow.com/questions/54552405/enable-autoscale-in-plotly-r