GithubHelp home page GithubHelp logo

Comments (6)

timelyportfolio avatar timelyportfolio commented on May 29, 2024

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.

timelyportfolio avatar timelyportfolio commented on May 29, 2024

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.

timelyportfolio avatar timelyportfolio commented on May 29, 2024

@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

image

from sunburstr.

sillasgonzaga avatar sillasgonzaga commented on May 29, 2024

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.

timelyportfolio avatar timelyportfolio commented on May 29, 2024

Will close for now? Feel free to reopen.

from sunburstr.

timelyportfolio avatar timelyportfolio commented on May 29, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.