-
Notifications
You must be signed in to change notification settings - Fork 120
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
feat(bar_chart): add shadow prop for value labels #785
Changes from 2 commits
9c0d1be
f2d0f69
7051c92
8570d67
e42ad56
0499acc
14a26f2
0035949
bf9b841
5857623
86dad5d
58a5651
5777029
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -61,6 +61,7 @@ export const Example = () => { | |||||
fontStyle: 'normal', | ||||||
padding: 0, | ||||||
fill: color('value color', '#000'), | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I also increased the size of the value font size to 12. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you think it should be a default setting or just a better starting point for this example? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was seeing the other charts where we have labels/values on top and normally they are black or with So for consistency, I think we should keep the value labels black and just increase the size to 12. How do you feel of then creating a second example to show that the value label can be customized? In this new example, you would use white value labels with a shadow. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @miukimiu which would you prefer?
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From my understanding when it flips the color on text the shadow should change too. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah thats true but I was actually thinking that the shadow be |
||||||
shadowColor: color('shadow color', 'transparent'), | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should enforce the use of a shadow:
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. by default in the chart config or just on this one story? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Forgotten to report here, just the story. |
||||||
offsetX: number('offsetX', 0), | ||||||
offsetY: number('offsetY', 0), | ||||||
}, | ||||||
|
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.
shadowBlur is by default 0, probably you want to disable the
shadowBlur
if configured in the context somewhere else and probably before writing the stroke, so moving this before the strokeText call or before the if statement you want to apply that reset also to the fillText