Quantcast
Channel: 🎛️ Dash - Plotly Community Forum
Viewing all articles
Browse latest Browse all 6271

:mega: Dash Pivottable v0.0.2 released, with support for Dash for R!

$
0
0

We’re excited to announce the release of Dash Pivottable v0.0.2, which provides support for Dash for R.

We’re also aiming for our first CRAN release this month, so look for that announcement to appear soon!

Changelog
https://github.com/plotly/dash-pivottable/releases/tag/v0.0.2

Previous Releases

Here’s an example of the Dash for R component in action, followed by a sample application using dashPivottable:

library(dash)
library(dashPivottable)
library(dashHtmlComponents)

app <- Dash$new()
app$title("Summary statistics for tips data")

app$layout(
  htmlDiv(
    list(
      dashPivotTable(
        id = "table",
        data = tips,
        cols = list("Day of Week"),
        colOrder = "key_a_to_z",
        rows = list("Party Size"),
        rowOrder = "key_a_to_z",
        rendererName = "Grouped Column Chart",
        aggregatorName = "Average",
        vals = list("Total Bill"),
        valueFilter = list("Day of Week"=list("Thursday"=FALSE))
      ),
      htmlDiv(
        id = "output"
      )
    )
  )
)

app$callback(output = output(id="output", property="children"),
            params = list(input(id="table", property="cols"),
                          input(id="table", property="rows"),
                          input(id="table", property="rowOrder"),
                          input(id="table", property="colOrder"),
                          input(id="table", property="aggregatorName"),
                          input(id="table", property="rendererName")),
            function(cols, rows, row_order, col_order, aggregator, renderer) {
              return(
                list(
                  htmlP(cols, id="columns"),
                  htmlP(rows, id="rows"),
                  htmlP(row_order, id="row_order"),
                  htmlP(col_order, id="col_order"),
                  htmlP(aggregator, id="aggregator"),
                  htmlP(renderer, id="renderer")
                )
              )
            }
)

app$run_server(debug=TRUE)

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 6271

Latest Images

Trending Articles



Latest Images