ivnsch / PieCharts

Easy to use and highly customizable pie charts library for iOS
Apache License 2.0
511 stars 92 forks source link

Labels overlapping #61

Open ergunkocak opened 4 years ago

ergunkocak commented 4 years ago

Hello,

First of thanks for the library.

The slice labels are overlapping if the slice values are too small. Here is a sample screenshot:

Screenshot 2020-03-31 at 09 38 00

Is it possible to solve this?

Best

ergunkocak commented 4 years ago

It is easily reproducable in Example project by chaging the models in DoughnutDemo.swift to :

        let models = [
            PieSliceModel(value: 0.1, color: colors[0]),
            PieSliceModel(value: 0.2, color: colors[1]),
            PieSliceModel(value: 0.3, color: colors[2]),
            PieSliceModel(value: 99.4, color: colors[1])
        ]
ergunkocak commented 4 years ago

@i-schuetz I will try to fix. Any inputs will be appreciated. Where to check for intersections, suggestions etc.. :)

ergunkocak commented 4 years ago

I created a pull request: https://github.com/i-schuetz/PieCharts/pull/62