Git Product home page Git Product logo

Comments (9)

 avatar commented on July 19, 2024

@smartinsightsfromdata Please help. This very useful package does not work as expected anymore. It's such a pity that R now lacks a solution for interactive pivot tables.

from rpivottable.

timelyportfolio avatar timelyportfolio commented on July 19, 2024

@gd047 Unfortunately I cannot re-create. See below for screencast.
rpivottable_120

from rpivottable.

 avatar commented on July 19, 2024

@timelyportfolio Have you tried it with rmarkdown >= 2.11, htmltools =0.5.2 and htmlwidgets = 1.5.4 ?

from rpivottable.

timelyportfolio avatar timelyportfolio commented on July 19, 2024

@gd047 Ok, I see now when I update rmarkdown to most current. This is not an elegant solution, but if you place a <style> tag in the Rmd similar to below I think we restore the expected original behavior without any detrimental effects. I do not think it is necessary to isolate the css but if so we could do something like ramnathv/htmlwidgets#231.

style tag

<style>
  .rpivotTable {
    position: relative;
  }
</style>

from rpivottable.

 avatar commented on July 19, 2024

@timelyportfolio Thank you very much. It really works. Nevertheless, I hesitate to use the package in new projects, because, as I see, it is not being maintained anymore. And I feel very sorry for that. It is the favorite widget of all those who use my web reports :-(

from rpivottable.

fraupflaume avatar fraupflaume commented on July 19, 2024

You can fix this issue by modifying the file at inst/htmlwidgets/lib/pivottable/pivot.min.js

Where you have coded the creation of the click function for the element class pvtTriangle, you used the function position(). If you use offset(), it will fix this issue. I figured this out today answering an old Stack Overflow question (probably asked by gd047). You can see this question here. (There are two answers; my SO author name is "Kat".)

from rpivottable.

 avatar commented on July 19, 2024

@fraupflaume Thank you once again :-)
I guess there is still some problem with the offset (in some cases..)
image

George D., Brani S.

from rpivottable.

 avatar commented on July 19, 2024

@fraupflaume I think you can replicate the above problem if you change the output in yaml to this:

output:
  html_document:
    toc: yes
    toc_float:
      collapsed: true

from rpivottable.

fraupflaume avatar fraupflaume commented on July 19, 2024

Alright, @gd047 I've updated my repository with a change and tried to break it in any way that I could think of. Please try to break it, again.

For the team at rpivotTable, as you already know, but perhaps don't have memorized, the element the click function for the UI filters is attached to is .pvtTriangle. it seems that no matter where I place rpivotTable(), the third offsetParent of elements with the class .pvtTriangle is the first offsetParent of the pop-up UI filters.

I'm sure there's a more elegant way to do this, but it works.... until @gd047 breaks it

b = t("<span>").addClass("pvtTriangle").html(" &#x25BE;").bind("click", function(e) {
            var n, r, a, r2;  // added r2
            r2 = t(e.currentTarget.offsetParent.offsetParent.offsetParent).offset() // collected third offsetParent offset
            return r = t(e.currentTarget).offset(), n = r.left - r2.left, a = r.top - r2.top, x.css({ // subtracted the new values
              left: n + 10,
              top: a + 10
            }).show()
          })

from rpivottable.

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.