Comments (6)
I had not previously exposed the breadcrumb trail to customization. I'll look into it to see how easy it might be. I seem to remember this being a variable.
from sunburstr.
Thanks @sillasgonzaga, in 778cded I added an argument breadcrumb
to customize the size of the breadcrumb. The issue though is the breadcrumb is set up as SVG
and text-wrapping is difficult, so the trail will easily exceed the size of the page.
sunburst(sequences, breadcrumb = list(w = 200))
I will try to think of other strategies.
from sunburstr.
@sillasgonzaga I just added tasks
functionality, which would allow styling with a smaller font-size
.
sb <- sunburst(sequences,breadcrumb = list(w = 50))
sb$x$tasks <- htmlwidgets::JS(
'function(){d3.select(this.el).select("#" + this.el.id + "-trail").style("font-size","60%")}'
)
sb
Again, not optimal but potentially helpful.
If you were ok with dumping the text and just using color in the breadcrumb, you could do something like this.
sb <- sunburst(sequences,breadcrumb = list(w = 10))
sb$x$tasks <- list(htmlwidgets::JS(
'function(){d3.select(this.el).select("#" + this.el.id + "-trail").style("font-size","0")}'
))
sb
from sunburstr.
Both the breadcrumb
argument and the tasks
functionality are wonderful additions to sunburstR. By using them and changing the parameters of sb$sizingPolicy$padding
and sb$sizingPolicy$knitr$figure = FALSE
I managed to arrange my messed dataset into an outstanding visualization in a knitr document.
Many thanks for the quick fix.
If you allow me to make you a suggestion, I would include the default values of the breadcrumb argument in the ?sunburst
output
from sunburstr.
Will close for now? Feel free to reopen.
from sunburstr.
@sillasgonzaga pulls #13 and #14 should help with this if you want to give it a whirl. Would love testing.
from sunburstr.
Related Issues (20)
- sund2b rootLabel malfunction when tooltip option used HOT 2
- no output HOT 4
- sunburst d2b & d3tree treemap fail to render together in shiny HOT 3
- Export sunburst plot as static vector image
- Have the legend open by default HOT 1
- Sizing problems of sund2b output in shiny window or browser with fluidPage HOT 2
- Radial color gradients within arcs HOT 3
- csv_to_hier not working as expected when only one element is spitted out by str_split HOT 18
- Sunburst function examples all fail "Error: Argument 1 must have names" HOT 6
- legend font HOT 1
- crosstalk support HOT 5
- sund2b - display root label on top, centered, and horizontal?
- Solution for manually coloring each leaf? HOT 7
- sunburst example is not working HOT 3
- rootLabel in sund2b is not working HOT 1
- warning when using sunburstOutput with shiny 1.7.4 (latest CRAN) HOT 3
- sunburst plot is rounding when it shouldn't v2.1.8 HOT 3
- custom sund2bBreadcrumb outputs text in all upper case HOT 1
- Modify sund2b breadcrumb size HOT 2
- Error when exporting HTML-plot
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sunburstr.