-
-
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
Add RoundedCornersBarChatRenderer which provides the ability to draw bar charts with rounded corners #4494
base: master
Are you sure you want to change the base?
Conversation
…bar charts with rounded corners
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.
|
This would be easy to accomplish by providing your custom renderer, if #4297 was merged. |
Absolutely agree. Please let me know if it's merged so I will do some refinements to my pr. |
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