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

How can I take selected value index in Pie Chart #3282

Closed
mvorisis opened this issue Feb 21, 2018 · 1 comment
Closed

How can I take selected value index in Pie Chart #3282

mvorisis opened this issue Feb 21, 2018 · 1 comment

Comments

@mvorisis
Copy link

No description provided.

@mvorisis
Copy link
Author

mvorisis commented Feb 21, 2018

What I did to get it done was to change in Highlight class the description property as this:

    open override var description: String
    {
        return String(_x)
    }

Then called it in chartValueSelected as this:

Int(Double(highlight.description) ?? 0.0)

EDIT

I added this line:
@objc open var itemSelected: Int { return Int(_x)}

EDIT2

I will use the x property of highlight
Thanks in advance

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