From 088e1391702368362bf7b91299d097df91c2be42 Mon Sep 17 00:00:00 2001 From: Jan Marvin Garbuszus Date: Fri, 27 Oct 2023 22:45:17 +0200 Subject: [PATCH] allow tabular form --- R/helper-functions.R | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/R/helper-functions.R b/R/helper-functions.R index 7694162a3..c7677c626 100644 --- a/R/helper-functions.R +++ b/R/helper-functions.R @@ -758,6 +758,15 @@ create_pivot_table <- function( } pivotField <- NULL + + compact <- "" + if (!is.null(params$compact)) + compact <- params$compact + + outline <- "" + if (!is.null(params$outline)) + outline <- params$outline + for (i in seq_along(x)) { dataField <- NULL @@ -814,7 +823,10 @@ create_pivot_table <- function( else sort <- "ascending" } - attrs <- c(axis, dataField, showAll = "0", sortType = sort) + attrs <- c( + axis, dataField, showAll = "0", sortType = sort, + compact = as_xml_attr(compact), outline = as_xml_attr(outline) + ) tmp <- xml_node_create( "pivotField", @@ -992,10 +1004,6 @@ create_pivot_table <- function( if (!is.null(params$multipleFieldFilters)) multipleFieldFilters <- params$multipleFieldFilters - outline <- "1" - if (!is.null(params$outline)) - outline <- params$outline - outlineData <- "1" if (!is.null(params$outlineData)) outlineData <- params$outlineData