-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change position:relative for htmlwidget div container so tooltip work
- Loading branch information
1 parent
06998ed
commit f235974
Showing
4 changed files
with
67 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# silly test to check multiple radviz on a page | ||
# and make sure tooltips work as expected | ||
|
||
library(shiny) | ||
library(radviz) | ||
|
||
ui <- fluidPage( | ||
fluidRow( | ||
column( | ||
width = 6, | ||
radvizOutput("radviz1") | ||
), | ||
column( | ||
width = 6, | ||
radvizOutput("radviz2") | ||
) | ||
) | ||
) | ||
|
||
server <- function(input,output,session){ | ||
output$radviz1 <- renderRadviz({ | ||
radviz(iris, diameter=400, margin=100, | ||
use_repulsion=TRUE, draw_links=TRUE, | ||
width=400, height=500 | ||
) %>% | ||
add_dimensions(c('Sepal.Length', 'Sepal.Width', | ||
'Petal.Length', 'Petal.Width')) %>% | ||
add_color("Species") %>% | ||
add_tooltip("function(d){ return 'Petal width: ' + d['Petal.Length']; }") | ||
}) | ||
|
||
output$radviz2 <- renderRadviz({ | ||
radviz(iris, diameter=400, margin=100, | ||
use_repulsion=TRUE, draw_links=TRUE, | ||
width=400, height=500 | ||
) %>% | ||
add_dimensions(c('Sepal.Length', 'Sepal.Width', | ||
'Petal.Length', 'Petal.Width')) %>% | ||
add_color("Species") %>% | ||
add_tooltip("function(d){ return 'Petal width: ' + d['Petal.Length']; }") | ||
}) | ||
} | ||
|
||
shinyApp(ui,server) |
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters