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

color_bar size and alignment #49

Closed
jtaveras opened this issue Feb 27, 2016 · 3 comments
Closed

color_bar size and alignment #49

jtaveras opened this issue Feb 27, 2016 · 3 comments
Assignees
Milestone

Comments

@jtaveras
Copy link

Hi, discovering this package has made my day / week / month ... thank you!

I've found two issues with color_bar. Here is the original (ignore the yellow stuff bleeding over from the next column):

image

  1. normalize creates non-proportional sizes. E.g., in the table below, it appears the first cell is a tiny fraction of the second, but it really is just half of it. So the bar should be half as well.

My solution was to override your normalize function and return x / max.

  1. When color_bar is really small, it pushes the number right. My solution was to add a css tag "direction:rtl"

Here is the result

image

@renkun-ken
Copy link
Owner

Thanks for the solution. I'll improve the built-in formatters for such issues.

@renkun-ken
Copy link
Owner

Related to #42.

The update implements proportion (suggestion 1). Both color_bar and color_tile uses direction:tbl (suggestion 2).

@github-actions
Copy link

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants