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

fix margins #36

Open
Fil opened this issue Jan 20, 2020 · 3 comments
Open

fix margins #36

Fil opened this issue Jan 20, 2020 · 3 comments

Comments

@Fil
Copy link
Collaborator

Fil commented Jan 20, 2020

margins are problematic, they tend to erase smaller contents by giving it negative height or width.

I've fixed the case of "height" in the "horizontal" gridding mode, but it needs to be generalized and unit tested.

Fil added a commit that referenced this issue Jan 20, 2020
@Fil
Copy link
Collaborator Author

Fil commented Jan 20, 2020

Here we have 20 horizontal yearly series of 12 monthly values with valueHeight = max(monthly values) for each year. Adding margins in [email protected] will "eat" the content of the smaller series and give them negative heights.

before
before

When it's fixed we see all the series, and they share the available space evenly as a proportion of their valueHeight:

after
after

@Fil Fil mentioned this issue Jan 20, 2020
6 tasks
@Fil
Copy link
Collaborator Author

Fil commented Jan 21, 2020

here's an interesting difficulty: if we give to each year a valueHeight = sum(monthly value), then the margins are taken within the height, and the poor month 01 in 2020 is half the size of a similar month in 2019.
Capture d’écran 2020-01-21 à 10 11 26

Fil added a commit that referenced this issue Jan 21, 2020
fix:
 mode = horizontal, widths
 mode = vertical, heights
 mode = vertical, widths
@Fil
Copy link
Collaborator Author

Fil commented Jan 21, 2020

more or less fixed in #37

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

1 participant