在滚动单元格时,我希望将图像(而不是默认的行列值数据)嵌入到d3工具提示中。
library(shiny)
library(d3heatmap)
ui <- shinyUI(fluidPage(
titlePanel("Old Faithful Geyser Data"),
mainPanel(
d3heatmapOutput("out")
)
)
)
server <- shinyServer(function(input, output) {
output$out <- renderD3heatmap({
d3heatmap(x = mtcars,
Colv = NULL,
scale= "column",
key = FALSE,
yaxis_font_size = "10pt",
xaxis_font_size = "10pt")
})
})
shinyApp(ui = ui, server = server)发布于 2016-10-28 15:43:45
一种方法是在base64中对图像进行编码,然后将这些图像的矩阵传递给d3heatmap(.,cellnote =)
var tip = d3.tip()
.attr('class', 'd3heatmap-tip')
.html(function(d, i) {
return ('<img src="' + d.label + '"/>');
})https://stackoverflow.com/questions/40044089
复制相似问题