V1.1 - optimising for mobile and highlighting key text
Build and Push Docker Image / build (push) Successful in 1m9s
Build and Push Docker Image / build (push) Successful in 1m9s
This commit is contained in:
@@ -40,12 +40,19 @@ server <- function(input, output, session) {
|
||||
country_data <- league_averages_plot_selected_data()
|
||||
values <- as.numeric(country_data[1, -1])
|
||||
|
||||
theta_labels <- gsub("_", " ", names(country_data)[-1])
|
||||
theta_labels <- gsub("and ", "and<br>", theta_labels)
|
||||
theta_labels <- gsub("4 ", "4<br>", theta_labels)
|
||||
theta_labels <- gsub("number ", "number<br>", theta_labels)
|
||||
theta_labels <- gsub("by ", "by<br>", theta_labels)
|
||||
|
||||
custom_plotly(type = 'scatterpolar', fill = 'toself', hoverinfo = "none", xaxis_title = "", yaxis_title = "", width = width) %>%
|
||||
add_trace(
|
||||
r = c(values, values[1]),
|
||||
theta = c(gsub("_", " ", names(country_data)[-1]), gsub("_", " ", names(country_data)[-1][1]))
|
||||
theta = c(theta_labels, theta_labels[1])
|
||||
) %>%
|
||||
layout(
|
||||
margin = list(t = 50),
|
||||
polar = list(radialaxis = list(range = c(0,1))),
|
||||
showlegend = FALSE
|
||||
)
|
||||
@@ -70,12 +77,19 @@ server <- function(input, output, session) {
|
||||
group_data <- basic_profiless_plot_selected_data()
|
||||
values <- as.numeric(group_data[1, 2:10])
|
||||
|
||||
theta_labels <- gsub("_", " ", names(group_data)[2:10])
|
||||
theta_labels <- gsub("and ", "and<br>", theta_labels)
|
||||
theta_labels <- gsub("4 ", "4<br>", theta_labels)
|
||||
theta_labels <- gsub("number ", "number<br>", theta_labels)
|
||||
theta_labels <- gsub("by ", "by<br>", theta_labels)
|
||||
|
||||
custom_plotly(type = 'scatterpolar', fill = 'toself', hoverinfo = "none", xaxis_title = "", yaxis_title = "", width = width) %>%
|
||||
add_trace(
|
||||
r = c(values, values[1]),
|
||||
theta = c(gsub("_", " ", names(group_data)[2:10]), gsub("_", " ", names(group_data)[2:10][1]))
|
||||
theta = c(theta_labels, theta_labels[1])
|
||||
) %>%
|
||||
layout(
|
||||
margin = list(t = 50),
|
||||
polar = list(radialaxis = list(range = c(-0.4,0.4))),
|
||||
showlegend = FALSE
|
||||
)
|
||||
@@ -174,13 +188,20 @@ server <- function(input, output, session) {
|
||||
|
||||
group_data <- clustering_plot_selected_data()
|
||||
values <- as.numeric(group_data[1, 2:10])
|
||||
|
||||
theta_labels <- gsub("_", " ", names(group_data)[2:10])
|
||||
theta_labels <- gsub("and ", "and<br>", theta_labels)
|
||||
theta_labels <- gsub("4 ", "4<br>", theta_labels)
|
||||
theta_labels <- gsub("number ", "number<br>", theta_labels)
|
||||
theta_labels <- gsub("by ", "by<br>", theta_labels)
|
||||
|
||||
custom_plotly(type = 'scatterpolar', fill = 'toself', hoverinfo = "none", xaxis_title = "", yaxis_title = "", width = width) %>%
|
||||
add_trace(
|
||||
r = c(values, values[1]),
|
||||
theta = c(gsub("_", " ", names(group_data)[2:10]), gsub("_", " ", names(group_data)[2:10][1]))
|
||||
theta = c(theta_labels, theta_labels[1])
|
||||
) %>%
|
||||
layout(
|
||||
margin = list(t = 50),
|
||||
polar = list(radialaxis = list(range = c(-0.7,1.5))),
|
||||
showlegend = FALSE
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user