Add RoundedCornersBarChatRenderer which provides the ability to draw bar charts with rounded corners#4494
Closed
ZakharovPavlo wants to merge 8 commits intoChartsOrg:masterfrom
Closed
Add RoundedCornersBarChatRenderer which provides the ability to draw bar charts with rounded corners#4494ZakharovPavlo wants to merge 8 commits intoChartsOrg:masterfrom
ZakharovPavlo wants to merge 8 commits intoChartsOrg:masterfrom
Conversation
…bar charts with rounded corners
added 2 commits
November 3, 2020 15:20
Codecov Report
@@ Coverage Diff @@
## master #4494 +/- ##
==========================================
- Coverage 58.96% 58.76% -0.21%
==========================================
Files 50 51 +1
Lines 290 291 +1
==========================================
Hits 171 171
- Misses 119 120 +1
Continue to review full report at Codecov.
|
Contributor
|
This would be easy to accomplish by providing your custom renderer, if #4297 was merged. |
Author
|
Absolutely agree. Please let me know if it's merged so I will do some refinements to my pr. |
Collaborator
This file contains hidden or 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
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.
Goals ⚽
Give user ability to draw bar charts with rounded corners and specify corner radius as well as corners to be rounded
Implementation Details 🚧
The RoundedCornersBarChatRenderer class was created which inherits from BarChartRenderer and overrides
In BarChartRenderer drawDataSet(context: CGContext, dataSet: IBarChartDataSet, index: Int) method to include cornerRadius and UIRectCorner to which it applies rounding. So the basically use case is:
Use copy constructs RoundedCornersBarChatRenderer from regular BarChartRenderer class.
Then sets corners and radius.
Sets the renderer to the ChartView
Now user is able to draw bar charts with rounded corners.
Testing Details 🔍
No tests where added, will add if requested