mirror of
https://github.com/dylanbenzi/hurricane_normalization_app.git
synced 2026-07-30 05:08:57 +00:00
add y axis label to normalization chart
This commit is contained in:
+5
-1
@@ -388,8 +388,12 @@ output$cost_index_chart <- renderDygraph({
|
||||
|
||||
if (selected_scale == "Index") {
|
||||
value_columns <- paste0(selected_methods, " Index")
|
||||
|
||||
y_label <- "Cost Index"
|
||||
} else if (selected_scale == "Loss") {
|
||||
value_columns <- paste0(selected_methods, " Loss")
|
||||
|
||||
y_label <- "Normalized Loss"
|
||||
}
|
||||
|
||||
normalization_index <- normalized_data %>%
|
||||
@@ -414,7 +418,7 @@ output$cost_index_chart <- renderDygraph({
|
||||
select(-normalization_year) %>%
|
||||
xts(order.by = normalization_index$normalization_year)
|
||||
|
||||
dygraph(normalization_index_ts) %>%
|
||||
dygraph(normalization_index_ts, ylab = y_label) %>%
|
||||
dyOptions(
|
||||
colors = paletteer_d("ggthemes::Classic_Purple_Gray_12", ncol(normalization_index - 1)),
|
||||
fillGraph = T,
|
||||
|
||||
Reference in New Issue
Block a user