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

add format prop for sunburst #14

Closed
timelyportfolio opened this issue Feb 26, 2018 · 3 comments
Closed

add format prop for sunburst #14

timelyportfolio opened this issue Feb 26, 2018 · 3 comments

Comments

@timelyportfolio
Copy link

Finally circling back to add your amazing sunburst to the R package sunburstR. What are your thoughts on a format (see line) prop for the sunburst legend and tooltip in case a user is not working with whole numbers? I'm happy to help if you deem valuable and appropriate.

Thanks so much!

@kevinwarne
Copy link
Contributor

Hello again, glad to have you back working on this. There are accessor hooks to customize the built in tooltip and breadcrumb html. Here is a fiddle to see it working in action: https://jsfiddle.net/ujjurd9c/16/

Of course in this example we lose the styling a bit. To fix that you would need to use your own html template for these breadcrumbs / tooltips. Or you can just use the same format I'm using behind the scenes in d2b, something like:

<div class = 'd2b-sunburst-label'>
  *label here*
</div>
<div class = 'd2b-sunburst-value'>
  *value here*
  <div class = 'd2b-sunburst-percent'>
    *percent here*
  </div>
</div>

Let me know if you think this might work. Thanks!

@timelyportfolio
Copy link
Author

@kevinwarne, thanks so much, this is great. I think I can use this to add some customizability in the widget implementation.

@kevinwarne
Copy link
Contributor

Sounds like a good customization to have. Let me know if you have more questions. Also, since we spoke a while back the Vue d2b components have been moved into a separate plugin called “vue-d2b” just a heads up in case you are hoping to still use those.

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