Comments (8)
@jangorecki Looks like we need to do a couple things to support rowTotals
and colTotals
now provided and explained in rendererOptions.
- update pivottable to the newest release
2.23.0
- add arguments
rowTotals
andcolTotals
or a recycling option as you suggest
For now, a very ugly solution would be to modify the htmlwidget
as shown below.
library(rpivotTable)
rp <- rpivotTable(
Titanic,
rows = "Survived",
cols = c("Class","Sex"),
aggregatorName = "Sum as Fraction of Columns",
vals = "Freq"
)
rp$x$params$rendererOptions <- list(table = list(rowTotals = FALSE))
htmltools::browsable(
htmltools::attachDependencies(
htmltools::tagList(
rp
),
htmltools::htmlDependency(
name = "pivottable",
version = "2.23.0",
src = c(href = "https://unpkg.com/"),
script = "[email protected]/dist/pivot.min.js",
stylesheet = "[email protected]/dist/pivot.css"
),
append = TRUE
)
)
from rpivottable.
According to the pivottable Q&A it is possible do what you want changing the css:
.pvtTotal, .pvtTotalLabel, .pvtGrandTotal {display: none}
You could in principle fork the package, change the css as above and use the new version: a lot of work!
What would make sense though, would be a way to change the css programmatically, i.e. on the fly.
I'm investigating...
from rpivottable.
Perhaps ramnathv/htmlwidgets#231 will help.
from rpivottable.
@timelyportfolio great suggestion!
I was hoping to be able to use the JS method described here,
but I haven't been able to change the css on the fly in javascript (see my reply), therefore I'm a bit stuck.
Any further help is very welcome!
from rpivottable.
@smartinsightsfromdata I tried it in CSS - I added a style.css file to a folder 'www' in the project folder and then tried to add code that @XavierFlo shared. That didn't work. But if I change/add other things to the file about header and interface, it does change the Shiny output.
from rpivottable.
I will give it a try next week, as I will be on hols :)
from rpivottable.
@anu87 Apologies for taking so long. I didn't get around to try this, but I now posted in github (cran ongoing) a new version of rpivotTable aligned to the latest version of pivottable.
Would you be so kind to try again and report?
See also this nicolaskruchten/pivottable#538
from rpivottable.
There is subtotals
argument to enable sub totals but there is no totals
argument to disable totals... New totals
argument could take logical of length two (recycled when length 1) to control rows/columns separately allowing to disable only row totals.
As per linked issue in pivottable js, this seems to be implemented there already, could we add support in rpivotTable
function for that?
from rpivottable.
Related Issues (20)
- Provide option to escape html HOT 3
- pivottable does not work with login/logout module HOT 7
- Using pivotTable from static html HOT 1
- factor levels order is not retained HOT 7
- aggregate name: identity HOT 7
- reduce area of metadata in output table HOT 3
- append style to rpivotTable css styles HOT 2
- Easier extendibility of rpivotTable() for custom S3 classes
- Support Excel Date Slice? HOT 1
- rpivotTable doesn't display anything HOT 1
- Question: Is there a way to sort table by values displayed in current column selection?
- My question is, How to colorize "Heatmap", creating a function with "ifelse ()"?????
- Plotting multiple rpivotTable with for loop in html r-markdown
- Compatibility with Bootstrap 4? HOT 1
- Top row missing (where remaining pivot variables sit)
- Drop down arrows problem with crosstalk v.1.1.1.
- rpivotTable is not working together with shinyjqui
- Drop down lists open in wrong position HOT 9
- Can't sort the Total column in the Pivot Table
- Sort rows in locale with characters not found in English
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 rpivottable.