perspectiveOutput: Shiny Output for Perspective Viewer

View source: R/perspective-shiny.R

perspectiveOutputR Documentation

Shiny Output for Perspective Viewer

Description

Creates a Perspective viewer output element for use in a Shiny UI.

Usage

perspectiveOutput(outputId, width = "100%", height = "400px")

Arguments

outputId

Output variable name.

width

CSS width (default "100%").

height

CSS height (default "400px").

Details

The following reactive inputs are available (where outputId is the ID you supply):

input$<outputId>_config

Viewer configuration changes.

input$<outputId>_click

Cell/data-point click events.

input$<outputId>_select

Row/data-point selection events.

input$<outputId>_update

Table data changes (requires psp_on_update).

input$<outputId>_export

Exported data (after psp_export).

input$<outputId>_state

Saved viewer state (after psp_save).

input$<outputId>_schema

Table schema (after psp_schema).

input$<outputId>_size

Table row count (after psp_size).

input$<outputId>_columns

Table column names (after psp_columns).

input$<outputId>_validate_expressions

Expression validation results (after psp_validate_expressions).

Value

A Shiny output element.

Examples

if (interactive()) {
library(shiny)
ui <- fluidPage(
  perspectiveOutput("viewer", height = "600px")
)
}


perspectiveR documentation built on March 30, 2026, 9:06 a.m.