Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upOrder of data with e_line #126
Comments
|
I had not anticipated people needing to do this. I have just added a # install.packages("remotes")
remotes::install_github("JohnCoene/echarts4r")data.frame(
x = c(20, 50, 40),
y = c(120, 200, 50)
) %>%
e_charts(x, reorder = FALSE) %>%
e_line(y)Let me know if this works. |
|
Perfect, it works as expected. That was a crazy quick response, thank you very much for your help. |
|
Thank you for submitting this please don't hesitate to share any other issue you run into. |
Hello! Thank you for the wrapper for echarts, things are looking great.
I noticed that when I try to plot certain X and Y values, the chart reorders the data, so that lower X values are always plotted before higher X values.
For example, if I try to plot
I get the following

However, when I see a plot with the same data at the echarts site https://www.echartsjs.com/examples/en/editor.html?c=line-in-cartesian-coordinate-system you can see that the chart is different.

Basically, the chart done natively with JS follows the order of the data, while the chart done with the R wrapper reorders the data. This is confirmed by inspecting the resulting code:
Is there a way to override this type of behaviour? Thank you!