Skip to content

Commit

Permalink
Merge pull request #39 from SanjayShetty01/format-text-and-color
Browse files Browse the repository at this point in the history
text and icon formating
  • Loading branch information
SanjayShetty01 authored Oct 27, 2024
2 parents 420e274 + 50ef2cf commit 71f0410
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 26 deletions.
42 changes: 21 additions & 21 deletions app/view/dashboardModule.R
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ shopAnalysisUI <- function(id){
bs4Dash::box(
title = "Graphs",
status = "primary",
icon = shiny::icon("chart"),
icon = shiny::icon("chart-simple"),
width = 12,

highcharter::highchartOutput(ns("reqDayPlot")),
highcharter::highchartOutput(ns("incomePlot")),
highcharter::highchartOutput(ns("costPlot"))
highcharter::highchartOutput(ns("costPlot")),
highcharter::highchartOutput(ns("reqDayPlot"))

)
)
Expand Down Expand Up @@ -96,7 +96,7 @@ shopAnalysisServer <- function(id, data) {

bs4Dash::valueBox(
subtitle = shiny::em(shiny::strong("Daily Income")),
value = shiny::h2(income),
value = shiny::h2(scales::dollar(income)),
icon = shiny::icon("money-bill"),
color = "success",
width = 4
Expand All @@ -116,7 +116,7 @@ shopAnalysisServer <- function(id, data) {

bs4Dash::valueBox(
subtitle = shiny::em(shiny::strong("Monthly Income")),
value = shiny::h2(income),
value = shiny::h2(scales::dollar(income)),
icon = shiny::icon("money-bill"),
color = "success",
width = 4
Expand All @@ -136,7 +136,7 @@ shopAnalysisServer <- function(id, data) {

bs4Dash::valueBox(
subtitle = shiny::em(shiny::strong("Yearly Income")),
value = shiny::h2(income),
value = shiny::h2(scales::dollar(income)),
icon = shiny::icon("money-bill"),
color = "success",
width = 4
Expand All @@ -156,9 +156,9 @@ shopAnalysisServer <- function(id, data) {

bs4Dash::valueBox(
subtitle = shiny::em(shiny::strong("Shop Cost")),
value = shiny::h2(shopCost),
value = shiny::h2(scales::dollar(shopCost)),
icon = shiny::icon("money-bill"),
color = "success",
color = "danger",
width = 4
)

Expand All @@ -176,8 +176,8 @@ shopAnalysisServer <- function(id, data) {
bs4Dash::valueBox(
subtitle = shiny::em(shiny::strong("Farm Yield")),
value = shiny::h2(totalYield),
icon = shiny::icon("money-bill"),
color = "success",
icon = shiny::icon("percent"),
color = "olive",
width = 4
)

Expand All @@ -194,10 +194,10 @@ shopAnalysisServer <- function(id, data) {


bs4Dash::valueBox(
subtitle = shiny::em(shiny::strong("plceholder")),
subtitle = shiny::em(shiny::strong("Days Required to Recover")),
value = shiny::h2(FarmReqDay),
icon = shiny::icon("money-bill"),
color = "success",
icon = shiny::icon("calendar-check"),
color = "teal",
width = 4
)

Expand All @@ -211,11 +211,11 @@ shopAnalysisServer <- function(id, data) {
highcharter::hchart(labelData_non_reactive,
"column",
highcharter::hcaes(x = Level, y = reqDays),
color = "#0198f9",
color = "#20c997",
name = "Days Required to Recover the Investment for each Level") |>
highcharter::hc_title(text = "Required Days", align = "left") |>
highcharter::hc_title(text = "Days to Investment Recovery per Level") |>
highcharter::hc_xAxis(title = list(text = "Level")) |>
highcharter::hc_yAxis(title = list(text = "Required Days to Recover the Investment"))
highcharter::hc_yAxis(title = list(text = "Days"))

})

Expand All @@ -226,11 +226,11 @@ shopAnalysisServer <- function(id, data) {
highcharter::hchart(labelData_non_reactive,
"column",
highcharter::hcaes(x = Level, y = income),
color = "#0198f9",
color = "#28a745",
name = "Income from Animals for each Level") |>
highcharter::hc_title(text = "Income", align = "left") |>
highcharter::hc_title(text = "Cost per Animal Level") |>
highcharter::hc_xAxis(title = list(text = "Level")) |>
highcharter::hc_yAxis(title = list(text = "Income/ Hour"))
highcharter::hc_yAxis(title = list(text = "Income (Hour)"))

})

Expand All @@ -241,9 +241,9 @@ shopAnalysisServer <- function(id, data) {
highcharter::hchart(labelData_non_reactive,
"column",
highcharter::hcaes(x = Level, y = cost),
color = "#0198f9",
color = "#dc3545",
name = "Cost of Animals for each Level") |>
highcharter::hc_title(text = "Cost of Animal per Level", align = "left") |>
highcharter::hc_title(text = "Cost per Animal Level") |>
highcharter::hc_xAxis(title = list(text = "Level")) |>
highcharter::hc_yAxis(title = list(text = "Cost of Animal"))

Expand Down
10 changes: 5 additions & 5 deletions app/view/overviewModule.R
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ yieldTabServer <- function(id){

bs4Dash::valueBox(
subtitle = shiny::em(shiny::strong("Cost")),
value = shiny::h2(cost),
value = shiny::h2(scales::dollar(cost)),
icon = shiny::icon("money-bill"),
color = "success",
color = "danger",
width = 4
)
})
Expand All @@ -111,7 +111,7 @@ yieldTabServer <- function(id){
subtitle = shiny::em(shiny::strong("Yield")),
value = shiny::h2(paste0(yield, "%")),
icon = shiny::icon("percent"),
color = "orange",
color = "olive",
width = 4
)
})
Expand All @@ -122,9 +122,9 @@ yieldTabServer <- function(id){
store_type = input$storeType, nAnimalBought = input$Nbought)

bs4Dash::valueBox(
subtitle = shiny::em(shiny::strong("Days Required to recover")),
subtitle = shiny::em(shiny::strong("Days Required to Recover")),
value = shiny::h2(reqDays),
icon = shiny::icon("calendar"),
icon = shiny::icon("calendar-check"),
color = "teal",
width = 4
)
Expand Down

0 comments on commit 71f0410

Please sign in to comment.