Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

render parameter for SVG in echarts JSON #562

Open
munoztd0 opened this issue Aug 24, 2023 · 7 comments
Open

render parameter for SVG in echarts JSON #562

munoztd0 opened this issue Aug 24, 2023 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@munoztd0
Copy link
Collaborator

The json doesn't contain the renderer parameter if you set it as "svg".

Do you think that can be added to the json as well somehow?

relate to #560 @rdatasculptor

@munoztd0 munoztd0 self-assigned this Aug 24, 2023
@munoztd0 munoztd0 added the enhancement New feature or request label Aug 24, 2023
@JohnCoene
Copy link
Owner

It gets added here: https://github.com/JohnCoene/echarts4r/blob/2ee457a4541240a7996d332823c0cc5be60b21c1/inst/htmlwidgets/echarts4r.js#L64C42-L64C42

I'm not sure why I do this via JavaScript it could be added the main x options object.

@rdatasculptor
Copy link
Contributor

rdatasculptor commented Sep 5, 2023

there seem to be more than one parameter that isn't passed to the json, like group names (e_group("name") ,
connected groups ( e_connect_group("name"), timeline = TRUE., etc.
So maybe we should make this issue bigger than only the renderer?

@rdatasculptor
Copy link
Contributor

rdatasculptor commented Sep 5, 2023

@JohnCoene did you mean something like this by putting it all in x options object? Or is this approach just too simplistic? (@munoztd0)

 plotObject$x$opts$theme <- plotObject$x$theme
  plotObject$x$opts$tl <- plotObject$x$tl
  plotObject$x$opts$draw <- plotObject$x$draw
  plotObject$x$opts$renderer <- plotObject$x$renderer
  plotObject$x$opts$mapping <- plotObject$x$mapping
  plotObject$x$opts$events <- plotObject$x$events
  plotObject$x$opts$buttons <- plotObject$x$buttons
  plotObject$x$opts$data <- plotObject$x$data
  plotObject$x$opts$dispose <- plotObject$x$dispose
  plotObject$x$opts$chartGroup <- plotObject$x$chartGroup
  plotObject$x$opts$groupConnect <- plotObject$x$groupConnect

@JohnCoene
Copy link
Owner

I think it's just the renderer that is missing.

plotObject$x$renderer <- "svg"

@rdatasculptor
Copy link
Contributor

rdatasculptor commented Sep 6, 2023

I couldn't find the group name and group connect in the JSON (generated by e_inspect()) either. If I understand the code correctly the content of the JSON only contains the plotObject$x$opts. Then plotObject$x$renderer won't be in the JSON?

@JohnCoene
Copy link
Owner

Yes indeed, a few things will be missing.

The issue is that connect is not part of the main body of options (like the renderer) because it's not passed to echarts.setOptions(), these need to be passed to other options.

For connect it's passed here

Maybe with all the things you do with echarts4r we can schedule a quick call? Feel free to email me jcoenep[@]gmail.com

@rdatasculptor
Copy link
Contributor

@JohnCoene thank you for the offer! Our frontender will try to figure out things first. But maybe I will get back to you later on. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants