Is there a way to round decimals in plotly? For example, I am getting the values as 24.32544 M.
Instead of this, can I get as 24.32 M?
asd <- data.frame(a = c(1,2,3,4), b = c(24325443,35345442,3245353453,345353523), c = c(5435352345,234534534,324534534,23453532))
plot_ly(asd, x = ~a, y = ~b, name = 'b', type = 'scatter', mode = 'lines') %>%
add_trace(y = ~c, name = 'c', mode = 'lines') %>%
layout(xaxis = list(title = paste0("Week"),showgrid = F,rangemode = "tozero"),
yaxis = list(title = "",showgrid = F,rangemode = "tozero"),
legend = legend_cus,
hovermode = 'x unified')