Search code examples
rshinyfont-sizeheatmapheatmaply

Problems with cellnote in heatmaply


I'm using heatmaply() to create an interactive heatmap for Shiny. I encounter a few challenges when using cellnote = "some values":

  1. cellnote starts in the center of the relevant tile of the heatmap by default. How to center it? (This is particularly frustrating when numbers start to overlap with the next tile)

  2. How to ensure that the cellnote is not top alligned? (notice it's almost as if the cellnote is placed in the top right of the cell)

  3. How to use a smaller text font (e.g. like notecex in heatmap.2)?

  4. When using cellnote the ability to hover in shiny only exists if you hover on the edges of a tile. It is as if the cellnote is placed on top of the heatmap and blocks some of the area of the tile such that the hover ability does not activate. Is there a fix for this?

For a visual of what I mean regarding cellnote: Cellnote not centered


Solution

    • 1 & 2: Try the cellnote_textposition argument in heatmaply. It adjusts both horizontal and vertical justification.
    • 3: I've created an issue for this. Thanks for pointing it out!
    • 4: This is a known issue and we would hope to resolve it eventually, though it is quite difficult to solve, unfortunately.