You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The x-axis ordering is controlled by the order in which values first appear in the trace data:
l<- plotly_build(p)
# notice how this matches the x-axis ordering
unique(unlist(lapply(l$data, "[[", "x")))
#> [1] A B C E F I G H J D#> Levels: A B C D E F G H I J
It seems like I should be able to control this ordering by setting the range of the axis, but this doesn't do what I want, any ideas @chriddyp@cldougl?
When I was writing tests for #241, I came across this problem where the bar chart x-axis factor level order is wrong.
R code:
ggplot2 figure:

Note the figure above has the x-axis in alphabetical order.
Plotly figure (based on PR #241): https://plot.ly/~13bzhang/1365/count-vs-cat1/

Now the x-axis is not in alphabetical order.
@cpsievert @chriddyp @mkcor
The text was updated successfully, but these errors were encountered: