-
Notifications
You must be signed in to change notification settings - Fork 232
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
45 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
library(shiny) | ||
library(ggplot2) | ||
library(thematic) | ||
# In order for auto/custom fonts to work properly, you'll want | ||
# either the ragg (or showtext) package installed | ||
library(ragg) | ||
|
||
# If you want `{ragg}` to handle the font rendering in a Shiny app | ||
options(shiny.useragg = TRUE) | ||
|
||
# Call thematic_shiny() prior to launching the app, to change | ||
# R plot theming defaults for all the plots generated in the app | ||
thematic_shiny(font = "auto") | ||
|
||
ui <- fluidPage( | ||
# bslib makes it easy to customize CSS styles for things | ||
# rendered by the browser, like tabsetPanel() | ||
# https://rstudio.github.io/bslib | ||
theme = bslib::bs_theme( | ||
bg = "#002B36", fg = "#EEE8D5", primary = "#2AA198", | ||
# bslib also makes it easy to import CSS fonts | ||
base_font = bslib::font_google("Pacifico") | ||
), | ||
|
||
esquisse_ui( | ||
id = "esquisse", | ||
header = FALSE, | ||
container = esquisse_container(height = "700px") | ||
) | ||
) | ||
|
||
server <- function(input, output) { | ||
|
||
esquisse_server( | ||
id = "esquisse", | ||
data_rv = reactive(palmerpenguins::penguins) | ||
) | ||
|
||
} | ||
|
||
shinyApp(ui, server) |