Giter VIP home page Giter VIP logo

Comments (3)

ThomasSiegmund avatar ThomasSiegmund commented on July 25, 2024

Dear Kenton,

thanks for all your nice comments, very helpful indeed.

I agree that static mode would be good to have. Actually I could make good
use of self contained html tables in my own work .

I've included jquery as first step, but there are at least two problems:

  • TableFilter doesn't find it's css and some js files
  • I guess I have to actively disable some of the shiny related functions
    for static mode

I will look into this soon.

Thanks again

Thomas

On Sun, Mar 1, 2015 at 10:47 PM, timelyportfolio [email protected]
wrote:

Maybe I'm confused, but I thought d3tf should work in both static and
shiny modes. static currently does not work since jQuery is not available
in this line
https://github.com/ThomasSiegmund/D3TableFilter/blob/master/inst/htmlwidgets/D3TableFilter.js#L15
.

I did confirm that static sort of works when the jQuery depedency is
added. Here is an example.

library(D3TableFilter)
library(htmltools)
library(magrittr)

tagList(d3tf(mtcars,
tableProps = tableProps,
showRowNames = TRUE,
tableStyle = "table table-bordered"
)) %>%
attachDependencies(
htmlDependency(
name = "jquery"
,version = "1.11.2"
,src = c(href = "http://code.jquery.com/")
,script = "jquery-1.11.2.min.js"
)
) %>%
htmltools::html_print()

Reply to this email directly or view it on GitHub
#1.

from d3tablefilter.

ThomasSiegmund avatar ThomasSiegmund commented on July 25, 2024

Please check latest version. Many things in static mode seem to work now.

saveWidget(... selfcontained = TRUE) fails for me with pandoc errors in this example:

����
library(magrittr)
library(htmlwidgets)
library(D3TableFilter)

tableProps <- list(
  btn_reset = TRUE,
  sort = TRUE,
  sort_config = list(
    # alphabetic sorting for the row names column, numeric for all other columns
    sort_types = c("String", rep("Number", ncol(mtcars)))
  )
);

mtcars %>% d3tf(tableProps = tableProps,
                        showRowNames = TRUE,
                        tableStyle = "table table-bordered") %>% 
  saveWidget(file = "test.html", selfcontained = TRUE)

from d3tablefilter.

ThomasSiegmund avatar ThomasSiegmund commented on July 25, 2024

Now D3 related functions work in static mode too, including D3 magic when editing a table. There is a demo script in examples: staticTableWithD3AndTableFilter.R

from d3tablefilter.

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.