Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overlay in column_info #6

Open
mxposed opened this issue Jun 21, 2023 · 1 comment
Open

Overlay in column_info #6

mxposed opened this issue Jun 21, 2023 · 1 comment

Comments

@mxposed
Copy link
Member

mxposed commented Jun 21, 2023

I am trying to implement minimal example from https://funkyheatmap.github.io/examples/minimal/
and I noticed that text on rects is printed with overlay behavior in column info

Specifically, row 15 specifies text to be rendered with overlay=TRUE, so it is on top of previous position of row 14.

I wonder if this is a good way to define what we want and if I should implement it like as is?

I would propose an alternative to have flexible options parameter in column_info to cover such things, i.e. print value inside geom from this column. One benefit would be that this will allow to shrink text to geom.

What do you think? @rcannood @LouiseDck @artuurC

@rcannood
Copy link
Collaborator

rcannood commented Jun 30, 2023

I think that makes total sense. I think this is related to funkyheatmap/funkyheatmap#9, in a sense.

I propose changing the column_info as follows:

  • size: changes the size of the geom
  • colour: changes the fill of the geom
  • label: plots a label on top of the geom (in which case we wouldn't need the overlay=TRUE anymore)
  • hover_text: render this text when hovering over an element (JS only)

For backwards compatibility reasons, specifying the id automatically uses it to set the size and colour (and maybe hover_text in JS?). Except for rectangles, which only change colour, by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants