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

line breaks with /n #9

Open
bookerbn opened this issue May 7, 2019 · 3 comments
Open

line breaks with /n #9

bookerbn opened this issue May 7, 2019 · 3 comments

Comments

@bookerbn
Copy link

bookerbn commented May 7, 2019

Hello,
I am developing a shiny app and am using circlepackeR for a visualization. I have multiple levels and everything is working fine but it does not appear that circlepackeR supports line breaks within a circle using "/n". I am trying to input two lines of text within a single circle using the following code:

data_nested$pathString <- paste(data_nested$level1, data_nested$circle1.OI.Primary, data_nested$circle1.OI.Secondary, data_nested$circle1.FEMA, paste0(data_nested$circle1.MG.Name," ", "\nFEMA", data_nested$circle1.FEMA), sep = "/")
data_nested$value=7
data_Node <- as.Node(data_nested)
circle <- circlepackeR(data_Node, size = "value")
circle

But it still outputs the text in a single line instead of two lines. Is there anyway to create a single circle with two lines of text?

@jeromefroe
Copy link
Owner

Hey! My guess is that the newline isn't being handled when it's being converted to JSON via the jsonlite package. It seems the jsonlite package supports unicode characters though, what happens if you replace \n with its unicode equivalent \u000d?

@bookerbn
Copy link
Author

bookerbn commented May 9, 2019

Hi Jerome,

Thanks for you the response. Unfortunately using the Unicode text does not work either. It gives me the same output as /n

@jeromefroe
Copy link
Owner

That's a bummer. Unfortunately, I'm out of ideas then. I don't have the cycles to actively maintain this package anymore (I don't really have the opportunity to use R in my current position) but if you find the time to look into the root cause, I'd be more than happy to review and merge a PR.

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

No branches or pull requests

2 participants