You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the wiki we can find this session under custom views:
Custom views
All bar layers allow to pass a generator that returns instances of ChartPointViewBar (or ChartPointViewBarStacked in the case of stacked bars), which extends UIView. You can subclass these classes to customize the views however you want, allowing to add e.g. outlines, patterns (e.g. for hatched bars) or any other kind of effect.
If you actually try to extend ChartPointViewBarStacked for instance, all the variables you need to access in order to customize the view bezierpath for instance are internal or fileprivate, therefore either you recreate the whole class(which will require other classes that we can't import with just the import SwiftCharts import or that will also have the same problems with fileprivate and internal variables.)
I found this out trying to make a bar chart that would have rounded top corners and is scrollable in the x axis. Everything is fine if I try things separately. However the current logic for stacked bars rounded corners stops working if we change the chart scaleX. I believed it would be possible to extend the ChartPointViewBarStacked and change the corners logic, but so far I have been unable to do so. I will possibly try manually importing the lib instead of using cocoapods.
The text was updated successfully, but these errors were encountered:
In the wiki we can find this session under custom views:
If you actually try to extend ChartPointViewBarStacked for instance, all the variables you need to access in order to customize the view bezierpath for instance are internal or fileprivate, therefore either you recreate the whole class(which will require other classes that we can't import with just the
import SwiftCharts
import or that will also have the same problems with fileprivate and internal variables.)I found this out trying to make a bar chart that would have rounded top corners and is scrollable in the x axis. Everything is fine if I try things separately. However the current logic for stacked bars rounded corners stops working if we change the chart scaleX. I believed it would be possible to extend the ChartPointViewBarStacked and change the corners logic, but so far I have been unable to do so. I will possibly try manually importing the lib instead of using cocoapods.
The text was updated successfully, but these errors were encountered: