Skip to content

Commit

Permalink
index issue
Browse files Browse the repository at this point in the history
  • Loading branch information
DivadNojnarg committed Sep 26, 2024
1 parent 586d697 commit 6e351c9
Show file tree
Hide file tree
Showing 2 changed files with 243 additions and 3 deletions.
2 changes: 1 addition & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ code_chunk <- function(output, language = "r") {
}

print_r_code <- function(name) {
path <- system.file(sprintf("examples/shinylive/%s/app.R", name), package = "shiny386")
path <- system.file(sprintf("examples/shinylive/%s/app.R", name), package = "tablerDash")
lines <- readLines(path)
to_remove <- grep("webr::", lines)
code_chunk(cat(paste(lines[-to_remove], collapse = "\n")))
Expand Down
244 changes: 242 additions & 2 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ install.packages("tablerDash")

## Demo

<div class="card bslib-card bslib-mb-spacing html-fill-item html-fill-container" data-bslib-card-init data-full-screen="false" data-require-bs-caller="card()" data-require-bs-version="5" id="bslib-card-2175" style="margin: 0 auto; float: none;">
<div class="card bslib-card bslib-mb-spacing html-fill-item html-fill-container" data-bslib-card-init data-full-screen="false" data-require-bs-caller="card()" data-require-bs-version="5" id="bslib-card-5440" style="margin: 0 auto; float: none;">
<div class="card-body bslib-gap-spacing html-fill-item html-fill-container" style="margin-top:auto;margin-bottom:auto;flex:1 1 auto;">
<iframe class="html-fill-item" src="https://shinylive.io/r/app/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAdzgCMAnRRASwgGdSoAbbgCgA6YLnW5wGAESjsAFkNwACBnFRF2CgLwKCgsDNKlU7RAHoTDNuQYAzKATgYA5i1IyArnQwsi5y+Nv2ALTU0jCBBAxQECbyCkL6hsZmyqoYDMGhGEQMjkIAlHkCEEXcLIxQDACefLJslYUQpeVVfCJiktIyDU2RLXAEMhWk7AAsDN1lvdW1EJUA6iwAJo5wwxPN1TBQjhYG40UHEADECotQXOrW3ETUAOLcRQBu-aTZ6gA8gQpwAB6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h=0" height="700" width="100%" style="border: 1px solid rgba(0,0,0,0.175); border-radius: .375rem;" allowfullscreen="" allow="autoplay" data-external="1"></iframe>
<iframe class="html-fill-item" src="https://shinylive.io/r/app/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAdzgCMAnRRASwgGdSoAbbgCgA6YLnW5wGAESjsAFkNwACBnFRF2CgLwKCgsDNKlU7RAHoTDNuQYAzKATgYA5i1IyArnQwsi5y+Nv2ALTU0jCBBAxQECbyCkL6hsZmyqoYDMGhGEQMjkIAlHkCEEXcLIxQDACefLJslYUQpeVVfCJiktIyDU2RLXAEMhWk7AAsDN1lvdW1EJUA6iwAJo5wwxPN1TBQjhYG4yWTFdWoPPAMqBSObmzsDUVFAMQKi1Bc6tbcRNQA4txFAG79UjZdQAHkCCjgAA8ThBFk4LIs+FDNApAgBmRDoxSVVEYrENGBuBTghQARgBQJBABJ2CjSYCCMCGOxqZVKUyaexcaSiQoAFQKPhktEKRnM1lQgB6ACY8gKxVSWWzReKaVCORLqcRPgwSRDPo4yQAGPgMNwQFjWPgQBhfPhqll5RRkl3Ggr3CBPAgVRbsIofL4AYV9+oUbXEIYYSKKCnDLjEqKEADFPj9uAog4MGKR5LHtJ92FBRHBUcmAIIAGQAygBRXD5gBeRCIWxLqIAKlgAKr1-NEVCkbwcVFcRyVlicQQQONxiMMcv-V4VGpcUhudRaISleCxNwMDNbvQGIymEyoZT-FhwagYedeHycV4sAgmKBLrgskzGn8wDAAK1QXIwAaONnXzagllcVEyRlBsZ0hAYhlGBgAHk3EMDDdEDdN8nguNrBbKxR2LdoO22G1YFLI86GubhFliKBFkWEgkzAE52HYNhgMUJiWIgIMiF1Nj2DcAh7E4-IijuCALyIawWDEKNFjDecAAU7QUpTfWnONIMWaCtFg-D41IRMjwkSoohnWt2B9bgoDzBDRLoIczOouIwAAWX6QZLXshRq0qTg4BgdRawgZwIDgcQnLjdgGAINiElPMwLzgK8bzvUjxAfEwnyHV9UBkIhgXYEwFO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MNBeKDtOvZr83ewyX2qL3nOFfiS4oIM2sSEcwoRZ0HR06gACkAA+b3dc4AAH1XfDGRPKP3Ae6XB5wkHp+fBKiKDpEnxPErdQR-94HoPV5RI8CD1sVAUjQeWcUJDoyigniGnJAjr1Y6NZcV+juhQTw7MKCswoJp5Ik+t+xDrTvZSvWyC+Hrms9Zm9X0NWstgWAoh-a0KUdjDGdQdq0DoAA5A8dEZJ0QADYACcrm1+KA3yMVzAB2VzdARhH4UBvs-Iw+Jkhvxv4siw99wD38-h4cBjTWHRNYDlI-JzfaDfawMA6wOgawL-awGKY0PfY0aAl4OAHfJ-Y-B4awEYHfRYM9L-RYM-C7GUM-L-KAdzEpHfNfXzf9DPKPIRYPKEIPKAKEScKRdgNDFwRaDyBfSlIfagEfOsKghQSPLPSoBgpghZQfNg0gDg1ELgmoXLPg2sKg43GSCnEnXnEjR3OEcQbsJOD3ReexCAQiVbIRdbOlWHDyDicgU0VXakUFHgCFVFFYRQb7VpAjYNIhdVMAUScSHucLOlYuI8UbSWBhMuF2OyCwQcYcCDUqHgQKSFP7EME4OaUgARIOAVYXT0G3NQtXF7P7BnJ3cQF3bMYYMYPQ3+YPUPVaagrPXI0WaQDAD5cQF8fHAFakWo97Z0TyAPECZQ-MQXaSIoMAQXA3IAA&amp;h=0" height="700" width="100%" style="border: 1px solid rgba(0,0,0,0.175); border-radius: .375rem;" allowfullscreen="" allow="autoplay" data-external="1"></iframe>
</div>
<bslib-tooltip placement="auto" bsOptions="[]" data-require-bs-version="5" data-require-bs-caller="tooltip()">
<template>Expand</template>
Expand All @@ -52,6 +52,246 @@ aria-controls="demo-code"> Toggle code </a>
<div id="demo-code" class="collapse">

``` r
library(shiny)
library(tablerDash)
library(echarts4r)
library(shinyWidgets)
library(magrittr)
library(palmerpenguins)


# datas flowGl
vectors <- expand.grid(x = -3:3, y = -3:3)
mu <- 1
vectors$sx <- vectors$y
vectors$sy <- mu * (1 - vectors$x^2) * vectors$y - vectors$x
vectors$color <- log10(runif(nrow(vectors), 1, 10))

# cards
flowCard <- tablerCard(
title = "FlowGl Chart",
closable = FALSE,
zoomable = TRUE,
options = tagList(
tablerAvatar(status = "lime", url = "https://preview.tabler.io/static/avatars/000m.jpg")
),
width = 12,
echarts4rOutput("flowGl"),
footer = tablerTag(name = "build", addon = "passing", addonColor = "success")
)

profileCard <- tablerProfileCard(
width = 12,
title = "Dyann Escala",
subtitle = "Mechanical Systems Engineer",
src = "https://preview.tabler.io/static/photos/finances-us-dollars-and-bitcoins-currency-money.jpg",
tablerSocialLinks(
tablerSocialLink(
name = "facebook",
href = "https://www.facebook.com",
icon = "facebook"
),
tablerSocialLink(
name = "twitter",
href = "https://www.twitter.com",
icon = "twitter"
)
)
)

# app
shiny::shinyApp(
ui = tablerDashPage(
navbar = tablerDashNav(
id = "mymenu",
src = "https://raw.githubusercontent.com/tabler/tabler/dev/src/static/logo.svg",
navMenu = tablerNavMenu(
tablerNavMenuItem(
tabName = "Home",
icon = "home",
"Home"
),
tablerNavMenuItem(
tabName = "Test",
icon = "box",
"Test"
)
),
tablerDropdown(
tablerDropdownItem(
title = "Item 1 title",
href = "http://google.com",
status = "danger",
date = "now",
"This is the first dropdown item"
),
tablerDropdownItem(
status = "warning",
"This is the second dropdown item",
date = "yesterday"
),
tablerDropdownItem(
title = "Item 3 title",
"This is the third dropdown item"
)
)
),
footer = tablerDashFooter(
tablerIcon(name = "maestro", lib = "payment"),
tablerIcon(name = "mastercard", lib = "payment"),
copyrights = "@David Granjon, 2024"
),
title = "tablerDash",
body = tablerDashBody(

chooseSliderSkin("Modern"),
tablerTabItems(
tablerTabItem(
tabName = "Home",
fluidRow(
column(
width = 4,
profileCard,
numericInput(
inputId = "totalStorage",
label = "Enter storage capacity",
value = 1000),
uiOutput("info")
),
column(
width = 8,
flowCard
)
),
fluidRow(
column(
width = 8,
tablerCard(
status = "primary",
statusSide = "top",
width = 12,
tablerTimeline(
tablerTimelineItem(
title = "Item 1",
status = "green",
date = "now"
),
tablerTimelineItem(
title = "Item 2",
status = NULL,
date = "yesterday",
"Lorem ipsum dolor sit amet,
consectetur adipisicing elit."
)
)
)
),
column(
width = 4,
tablerStatCard(
value = 43,
title = "Followers",
trend = -10,
width = 12
)
)
)
),
tablerTabItem(
tabName = "Test",
tablerCard(
title = "Plots",
plotOutput("distPlot"),
status = "info",
statusSide = "left",
width = 12,
footer = tagList(
column(
width = 12,
align = "center",
sliderInput(
"obs",
"Number of observations:",
min = 0,
max = 1000,
value = 500
)
)
)
),
tablerCard(
title = "Tables",
selectInput(
"variable",
"Variables to show:",
choices = colnames(penguins),
selected = colnames(penguins),
multiple = TRUE
),
tableOutput("data"),
width = 12,
overflow = TRUE
),
tablerCard(
width = 12,
echarts4rOutput("gauge", height = "300px"),
sliderInput(
"gaugeVal",
"Gauge Value:",
min = 0,
max = 100,
value = 50
)
)
)
)
)
),
server = function(input, output) {
output$distPlot <- renderPlot({
hist(rnorm(input$obs))
})
output$data <- renderTable({
penguins[, input$variable, drop = FALSE]
}, rownames = TRUE)

output$flowGl <- renderEcharts4r({
vectors %>%
e_charts(x) %>%
e_flow_gl(y, sx, sy, color) %>%
e_visual_map(
min = 0, max = 1, # log 10
dimension = 4, # x = 0, y = 1, sx = 3, sy = 4
show = FALSE, # hide
inRange = list(
color = c('#313695', '#4575b4', '#74add1', '#abd9e9', '#e0f3f8',
'#ffffbf', '#fee090', '#fdae61', '#f46d43', '#d73027', '#a50026')
)
) %>%
e_x_axis(
splitLine = list(show = FALSE)
) %>%
e_y_axis(
splitLine = list(show = FALSE)
)
})

output$info <- renderUI({
tablerInfoCard(
width = 12,
value = paste0(input$totalStorage, "GB"),
status = "success",
icon = "database",
description = "Total Storage Capacity"
)
})

output$gauge <- renderEcharts4r({
e_charts() %>%
e_gauge(as.numeric(input$gaugeVal), "%")
})
}
)
```

</div>
Expand Down

0 comments on commit 6e351c9

Please sign in to comment.