From 74f6cc299339c4b3f5c466726a17e36f29a0f474 Mon Sep 17 00:00:00 2001 From: patdbro <39250191+patdbro@users.noreply.github.com> Date: Wed, 12 Jun 2019 09:20:40 +1000 Subject: [PATCH] Chart fixes Fix pie colour and userjourney link width --- shiny/observatory/agencycomparison.R | 8 ++++++-- shiny/observatory/userjourneys.R | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/shiny/observatory/agencycomparison.R b/shiny/observatory/agencycomparison.R index 0e6aef2..df8eb45 100644 --- a/shiny/observatory/agencycomparison.R +++ b/shiny/observatory/agencycomparison.R @@ -94,8 +94,9 @@ agencycomparison_server <- function (input, output) { output$view1 <- renderPlot({ datasetInput() %>% top_n(5) %>% - ggplot(aes(x="", y=tot_source, color=sourceurl)) + + ggplot(aes(x="", y=tot_source, fill=sourceurl)) + geom_bar(width = 1, stat = "identity")+ + ylab(NULL)+ coord_polar("y", start = 0)+ theme_minimal() + labs(title = NULL) @@ -104,11 +105,14 @@ agencycomparison_server <- function (input, output) { output$view2 <- renderPlot({ DatasetCompare() %>% + group_by(sourceurl) %>% top_n(5) %>% - ggplot(aes(x="", y=tot_source)) + + ggplot(aes(x="", y=tot_source, fill = sourceurl)) + geom_bar(width = 1, stat = "identity")+ coord_polar("y", start = 0)+ + ylab(NULL)+ theme_minimal()+ + theme(legend.position = "none")+ labs(title = NULL) }) diff --git a/shiny/observatory/userjourneys.R b/shiny/observatory/userjourneys.R index 361f39f..70126fe 100644 --- a/shiny/observatory/userjourneys.R +++ b/shiny/observatory/userjourneys.R @@ -43,7 +43,7 @@ userjourneys_server <- function (input, output) { forceNetwork(Links = graph_data()$links, Nodes = graph_data()$nodes, Source = "source", Target = "target", Value = "value", NodeID = "name", - Group = "group", zoom = TRUE, linkWidth = (graph_data()$links$value)/50, opacity = .8) + Group = "group", zoom = TRUE, linkWidth = (graph_data()$links$value)/500, opacity = .4) }) }