-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathserver_impressiveperformances.R
44 lines (33 loc) · 1.26 KB
/
server_impressiveperformances.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
## ======================================================== ##
# Copyright (C) 2017 Nicholas Canova
#
# This launches the server side code for the
# Impressive Performances chart tool
## ======================================================== ##
# the logo
output$ip.logo <- renderImage({
filename <- 'Images/teamlogos.jpg'
this.width <- session$clientData$output_sc.logo_width
this.height <- this.width / (1365 / 1024) # the file ratio
# Return a list containing the filename
list(src = filename,
width = this.width,
height = this.height)
}, deleteFile = FALSE)
# the ghostplot
output$ip.ghostplot <- renderPlot({
df <- data.frame()
ggplot(df) + geom_point() + xlim(0, 10) + ylim(0, 100)
})
# and do the plot
output$impressiveperformances <- renderPlotly({
window.width <- session$clientData$output_ip.ghostplot_width
chart.type <- input$ip.chart.input
drawImpressivePerformancesChart(player.stats.bygame, chart.type, color.pal.df, window.width)[[1]]
})
# the table counting the performances
output$ip.table <- renderDataTable({
window.width <- session$clientData$output_ip.ghostplot_width
chart.type <- input$ip.chart.input
drawImpressivePerformancesChart(player.stats.bygame, chart.type, color.pal.df, window.width)[[2]]
})