-
Notifications
You must be signed in to change notification settings - Fork 224
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
Support custom font sizes #3584
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
styu
reviewed
Oct 7, 2021
styu
reviewed
Oct 7, 2021
michael-yx-wu
force-pushed
the
mw/custom-font-sizes
branch
from
October 12, 2021 01:15
85aaeea
to
460c564
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
michael-yx-wu
commented
Oct 12, 2021
Clean up jsdocDemo: quicktests | fiddle |
Nifdee
approved these changes
Oct 15, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally, seems to work fine.
michael-yx-wu
force-pushed
the
mw/custom-font-sizes
branch
from
October 18, 2021 15:39
c6c0087
to
209310c
Compare
Address nitsDemo: quicktests | fiddle |
styu
approved these changes
Oct 18, 2021
michael-yx-wu
changed the title
Support custom font sizes for some plots
Support custom font sizes
Oct 18, 2021
This pull request was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add support for custom label font size in the following places:
cc @Nifdee @billytrend
Testing
SVG measures distance to text elements using the text baseline instead of the top-left corner like it does with most other elements. I've taken care to redraw or reset the
typesettable
measurer's cache where applicable to make subsequent renders draw the text in the right place. When playing with the quicktests, please double check that the label is positioned reasonably as font size changes i.e. it doesn't crowd out other elements, it's hidden when there is no space to draw, etc.yarn start
and navigate to the links below. Gifs show what you should expect to see. I recommend using node8.10.0
with this repo, just to be consistent with the CI environment.Bar
http://localhost:9999/quicktests/dev/index.html#functional/bar_plot_label_font_size
Scatter
http://localhost:9999/quicktests/dev/index.html#functional/scatter_plot_label_font_size
Something weird is happening w/ the scatter plot labels. Unclear why the size "stutters" when increasing font size. Note that internally, we do not use scatter plot labels.
Category axis
http://localhost:9999/quicktests/dev/index.html#functional/category_axis_label_font_size
Numeric axis
http://localhost:9999/quicktests/dev/index.html#functional/numeric_axis_label_font_size
Time axis
http://localhost:9999/quicktests/dev/index.html#functional/time_axis_label_font_size