Skip to content

Outlier explorer widget doesn't render #137

Description

@xni7

@jwildfire outlier explorer htmlwidget seems to break and not rendering with following reprex

# HEAD of dev as of 15APR2023
remotes::install_github("SafetyGraphics/safetyCharts@9f99670")
# HEAD of dev as of 15APR2023
remotes::install_github("SafetyGraphics/safetyGraphics@b34bca0")

# Restart the R session
rstudioapi::restartSession()
rm(list=ls())

library(purrr)
library(safetyData)

sdtm <- list(
  dm=safetyData::sdtm_dm,
  aes=safetyData::sdtm_ae,
  labs=safetyData::sdtm_lb
)

outExpChart <- makeChartConfig() %>% purrr::keep(~.x$name == "safetyOutlierExplorer")

safetyGraphics::safetyGraphicsApp(
  charts = outExpChart,
  domainData=sdtm
)

Chrome dev console Error Msg:

shinyapp.ts:861 The selector you chose (".sg-safetyOutlierExplorer-chart-header .chart-header") could not be found in the DOM.
(anonymous) @ shinyapp.ts:861
htmlwidgets.js:735 Uncaught Error: All fields must be arrays
    at window.HTMLWidgets.dataframeToD3 (htmlwidgets.js:735:19)
    at Object.renderValue (defineWidget.js:16:46)
    at Object.renderValue (htmlwidgets.js:885:25)
    at shinyBinding.renderValue (htmlwidgets.js:539:20)
    at e.value (outputBinding.ts:48:12)
    at delegator.<computed> [as onValueChange] (htmlwidgets.js:112:23)
    at e.value (outputAdapter.ts:39:20)
    at e.value (shinyapp.ts:565:17)
    at e.<anonymous> (shinyapp.ts:743:20)
    at e.value (shinyapp.ts:724:29)

Chart renders ok with older version of {safetyCharts}

# commit 6dcac07 = July 18, 2022 
remotes::install_github("SafetyGraphics/safetyCharts@6dcac07")

# Restart the R session
rstudioapi::restartSession()
rm(list=ls())

library(purrr)
library(safetyData)

sdtm <- list(
  dm=safetyData::sdtm_dm,
  aes=safetyData::sdtm_ae,
  labs=safetyData::sdtm_lb
)

outExpChart <- makeChartConfig() %>% purrr::keep(~.x$name == "safetyOutlierExplorer")

safetyGraphics::safetyGraphicsApp(
  charts = outExpChart,
  domainData=sdtm
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions