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

Dynamically insert PieCustomViewsLayer? #18

Closed
utsengar opened this issue Jun 6, 2017 · 4 comments
Closed

Dynamically insert PieCustomViewsLayer? #18

utsengar opened this issue Jun 6, 2017 · 4 comments

Comments

@utsengar
Copy link

utsengar commented Jun 6, 2017

Can I do something like:

func onSelected(slice: PieSlice, selected: Bool) {
    if selected {
        chartView.layers = [createCustomViewsLayer()]
    }
 }

Also also tried adding it while creating the chartView but then when I hide all layers by default (container view), I am not able to set isHidden=false in onSelected

I am trying to add a uibezierpath around the selected slice, something like this:

file

@ivnsch
Copy link
Owner

ivnsch commented Jun 8, 2017

I think this is not possible right now but feel free to adapt the code, it's nicely organized (I hope) and should be easy to follow... Don't have time currently to do this myself, sorry :(

@utsengar
Copy link
Author

utsengar commented Jun 8, 2017

Sure thanks for the reply! Wil try to implement it.

@gaminilesh
Copy link

Hello utsengar,
How To set Center Title Text "$14,862 US bonds"?

@utsengar
Copy link
Author

@gaminilesh I haven't implemented it but to do that, you will need to insert a UIView (with a label) inside the chart and match the size of UIView so that its inside the chart.

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

3 participants