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 upe_axis_formatter does not appear to work #100
Comments
|
Sorry for the late response, took a bit of break in the summer. It does indeed not work, it's been a while since I worked on the axis formatter helpers, a lot of them are contributions from @artemklevtsov (thanks again!). My understanding is that the underlying JavaScript function would have to dramatically change in order to apply to both axis but I may be wrong. I'll look into it. |
|
Appreciate the response. Just for reference, the examples hold even if you are doing one at time. For example, neither of these work:
Any work around to format an axis without using the e_axis_formatter function for now? |
|
I think I have narrowed down the issue; would you happen to be on Linux? |
|
These errors were caused on a Windows computer, however, the ultimate deployment will be to a linux server. |
|
What's the output of Try cars %>%
e_charts(speed) %>%
e_line(dist) %>%
e_x_axis(speed,formatter = e_axis_formatter("decimal", locale = "en")) |
|
That code produces the same error as the earlier example. It also does not change if I include |
|
Should be fixed. remotes::install_github("JohnCoene/echarts4r") |
|
No luck here. Same error persists. |
|
I haven't tested it but in case you are using RStudio to view the chart, I suggest you view the chart in the browser. I remember when there's certain javascript included in the chart, some of them can't be displayed well in RStudio's viewer but it's ok to use in the browser. |
|
@shrektan that worked! Interesting that the javascript crashes in different ways for the x/y axis. But yes, that works! @JohnCoene maybe we can add this to the reference guide? |
|
Ah! Thank you @shrektan! I was totally out of ideas. I indeed don’t use RStudio but it’s to the best of my knowledge a browser (the whole of RStudio) you can right click inspect anything. I’ve encountered such issues in the past for the {signals} package: it had not occurred to me that this could be the issue here too. I’ll add a note in the documentation. Thanks again @shrektan for isolating the issue and thank you @nschwamm for the bug report. |
|
It's now mentioned in documentation + if using RStudio the function |
The e_axis_formatter does not appear to work such that taking the examples from the reference guide (https://echarts4r.john-coene.com/reference/axis.html) do not even work.
For example:
This just shows an empty output for me.
In fact, any example with e_axis_formatter applied to the y axis appear to fail.
If I try using it with the x axis, all the data disappears.