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
I encountered an issue when attempting to use e_text_g() to place text on both the left and right sides of a plot. While individually placing text on either side works well, attempting to combine both commands results in failure.
df |>
e_charts(x) |>
e_scatter(y) |>
echarts4r::e_text_g(
style = list(text = "left",
fontSize = 30,
fill = "red"),
left = "10%",
top = "7%"
)
And on the right side:
df |>
e_charts(x) |>
e_scatter(y) |>
echarts4r::e_text_g(
style = list(text = "right",
fontSize = 30,
fill = "red"),
right = "10%",
top = "7%"
)
However, when attempting to place text on both sides by chaining both commands, an issue arises:
df |>
e_charts(x) |>
e_scatter(y) |>
echarts4r::e_text_g(
style = list(text = "right",
fontSize = 30,
fill = "red"),
right = "10%",
top = "7%") |>
echarts4r::e_text_g(
style = list(text = "left",
fontSize = 30,
fill = "red"),
left = "10%",
top = "7%"
)
Expected Behavior
I would expect to successfully place text on both the left and right sides of the plot by chaining the e_text_g commands.
Thank you for looking into this issue. Any alternative approaches or suggestions for achieving the placement of text on both sides of the plot with reproducible distances from the borders are greatly appreciated.
The text was updated successfully, but these errors were encountered:
Well, I digged into the code and I think echarts4r doesn't seem to cause this unexpected behaviour. I am starting to think echarts itself doesn't allow for more than one graphical element per chart. @munoztd0, what do you think?
I encountered an issue when attempting to use
e_text_g()
to place text on both the left and right sides of a plot. While individually placing text on either side works well, attempting to combine both commands results in failure.Created on 2024-01-03 with reprex v2.0.2
Session info
Placing text on the left side works as expected:
And on the right side:
However, when attempting to place text on both sides by chaining both commands, an issue arises:
Expected Behavior
I would expect to successfully place text on both the left and right sides of the plot by chaining the
e_text_g
commands.Thank you for looking into this issue. Any alternative approaches or suggestions for achieving the placement of text on both sides of the plot with reproducible distances from the borders are greatly appreciated.
The text was updated successfully, but these errors were encountered: