Giter VIP home page Giter VIP logo

Comments (4)

timelyportfolio avatar timelyportfolio commented on May 19, 2024

So glad you are trying this. I think the problem is that I am using the development branch of data.tree. If possible, could you try?

devtools::install_github("gluc/data.tree")

If that fixes the problem, I will add this to the examples.

Thanks again. I would love any additional feedback, ideas, use cases, criticism. It is a work in progress.

from d3treer.

FrissAnalytics avatar FrissAnalytics commented on May 19, 2024

I installed the dev version as you suggested, unfortunately it still doesn't work. It did change something though. Before the code just wouldn't render. Now, the code renders, however, immediately after rendering the widget disappears. I also tested it in a shiny app, in that case nothing renders.

With respect to some additional feedback, first off great to see the commitment! I read it every week! It would be helpful to add a link to you github repos as cloning those is often fast and convenient. (I understand you are working on some more general repo for widgets?)

By the way, I also field tested your sortableR widget, which I also think has great potential. Two questions:

  1. If you dynamically create the content of the lists via renderUI the widget doesn't work properly (I think). For instance, let's modify your code and put a uiOutput call VariableSelector into it:

For ui.r we have:

    fluidRow(
      column(width = 4,
        tags$div(class="panel panel-default",
          tags$div(class="panel-heading","Variables"),
          tags$div(class="panel-body",id = "sort1", 

          uiOutput("VariableSelector")

          )
        )       
      ),
      column(width = 4,
        tags$div(class="panel panel-default",
          tags$div(class="panel-heading",tags$span(class = "glyphicon glyphicon-stats"),"Analyze as x (drag here)"),
          tags$div(class="panel-body",id = "sort2")
        )
      ),
      column(width = 4,
        tags$div(class="panel panel-default",
          tags$div(class="panel-heading",tags$span(class = "glyphicon glyphicon-stats"),"Analyze as y (drag here)"),
          tags$div(class="panel-body",id = "sort3")
        )            
      )
    ),
    sortableR( "sort1", options = list( group = "sortGroup1")),
    sortableR( "sort2", options = list( group = "sortGroup1")),
    sortableR( "sort3", options = list( group = "sortGroup1"))

then for server.r we have

  output$VariableSelector <- renderUI({
    lapply(colnames(mtcars),function(co){
      tag("p",list(class = class(mtcars[,co]),tags$span(class = "glyphicon glyphicon-move"),tags$strong(co)))
    }) 
  })

This code works, however, the items can no longer be added individually. It's either the whole list or nothing.

  1. I also was a bit confused how to get access to the indivual list items in server.r for sort1,sort2 and sort3.

from d3treer.

timelyportfolio avatar timelyportfolio commented on May 19, 2024

Looks like your issue is same as mtennekes/treemap#17. I believe it should now be fixed. Please let me know.

from d3treer.

timelyportfolio avatar timelyportfolio commented on May 19, 2024

@FrissAnalytics the commmit auto closed the issue. Feel free to reopen if still a problem.

from d3treer.

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.