Skip to content
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

Pie chart not at center #64

Open
rajdhakate opened this issue Dec 29, 2020 · 0 comments
Open

Pie chart not at center #64

rajdhakate opened this issue Dec 29, 2020 · 0 comments

Comments

@rajdhakate
Copy link

Hi Thank you for amazing lib.

I'm using the pie chart inside a collection view cell. And it doesn't seem to be at the center (horozontal center).
Pie chat view is added via Interface builder.

Version: PieCharts (0.0.7)

        // Pie chart settings
        chartView.selectedOffset = 20
        chartView.outerRadius = 75
        chartView.innerRadius = 45
        
        var textLayerSettings = PieLineTextLayerSettings()
        textLayerSettings.lineColor = UIColor.white
        textLayerSettings.label.font = UIFont.systemFont(ofSize: 12, weight: .bold)
        textLayerSettings.label.textColor = UIColor.white
        
        let textLayer = PieLineTextLayer()
        textLayer.settings = textLayerSettings
        
        chartView.layers = [textLayer]
        chartView.strokeColor = UIColor(hexString: Constants.kDarkBackgroundColor)
        chartView.strokeWidth = 3
        

Attached is a screenshot.
IMG_51BDBC5159D4-1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant