-
-
Notifications
You must be signed in to change notification settings - Fork 6k
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
added color for each legendEntry(if not set, using default legend color) #2640
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2640 +/- ##
==========================================
+ Coverage 19.65% 19.65% +<.01%
==========================================
Files 112 112
Lines 13717 13721 +4
==========================================
+ Hits 2696 2697 +1
- Misses 11021 11024 +3
Continue to review full report at Codecov.
|
@@ -205,7 +205,7 @@ open class LegendRenderer: Renderer | |||
} | |||
|
|||
let labelFont = legend.font | |||
let labelTextColor = legend.textColor | |||
var labelTextColor = legend.textColor |
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.
this should be let legendTextColor...
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.
@jjatie It's been a long time. I have to double-check it
@@ -431,6 +431,10 @@ open class LegendRenderer: Renderer | |||
|
|||
var posX = originPosX | |||
|
|||
if let labelColor = e.labelColor { |
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.
this should be let labelTextColor = e.labelColor ?? legendTextColor
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.
@jjatie It's been a long time. I have to double-check it
closed in favour of #3558 |
Simple way add color for each legendEntry.
Usage: