-
Notifications
You must be signed in to change notification settings - Fork 119
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(renderer): stroke opacity #335
Conversation
@markov00 a strange consequence of this is when stacking bars the bar segments don't look as uniform. |
83d0f6a
to
f481518
Compare
Codecov Report
@@ Coverage Diff @@
## master #335 +/- ##
==========================================
+ Coverage 98.27% 98.28% +<.01%
==========================================
Files 38 38
Lines 2729 2737 +8
Branches 643 644 +1
==========================================
+ Hits 2682 2690 +8
Misses 43 43
Partials 4 4
Continue to review full report at Codecov.
|
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 LGTM
## [11.0.1](v11.0.0...v11.0.1) (2019-08-26) ### Bug Fixes * **renderer:** stroke opacity ([#335](#335)) ([d8c8459](d8c8459))
🎉 This PR is included in version 11.0.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
## [11.0.1](elastic/elastic-charts@v11.0.0...v11.0.1) (2019-08-26) ### Bug Fixes * **renderer:** stroke opacity ([opensearch-project#335](elastic/elastic-charts#335)) ([6f35fa0](elastic/elastic-charts@6f35fa0))
Summary
Fix #323
Fix stoke opacity on bar charts.
Add a property for
strokeOpacity
onRectBorderStyle
. Fallback usesopacity
onRectStyle
.If
strokeOpacity
is provided theunhighlighted
stoke opacity is averaged between the provided value and the globalunhighlighted
opacity value.This change requires splitting the fill and stroke into TWO separate
Rect
elements as the KonvaRect
API does not allow for stroke opacity but forces inheritance from the fill opacity.Currently, the
perfectDrawEnabled
is set tofalse
which causes the border to overlap the fill. These changes inset the border/stroke inside of the filled rectangle/bar. https://konvajs.org/docs/performance/Disable_Perfect_Draw.htmlDemo
Checklist