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

BarChartDataEntry with Int instead of Double #1112

Closed
wema1043 opened this issue Jun 7, 2016 · 2 comments
Closed

BarChartDataEntry with Int instead of Double #1112

wema1043 opened this issue Jun 7, 2016 · 2 comments

Comments

@wema1043
Copy link

wema1043 commented Jun 7, 2016

Is it possible to get a BarChart with Ints?

public init(values: [Double], xIndex: Int)
I can use only Doubles.

currently it will be shown this way:
Bar1: 15,0
Bar2: 20,0
Bar3: 7,0

But I want:
Bar1: 15
Bar2: 20
Bar3: 7

how can i do this?

@hardikdevios
Copy link

        chartDataSet.valueFormatter = NSNumberFormatter()
        chartDataSet.valueFormatter?.alwaysShowsDecimalSeparator = false

chartDataSet is a object of BarChartDataSet. i guess you know about it.

@wema1043
Copy link
Author

wema1043 commented Jun 7, 2016

thanks you!

@wema1043 wema1043 closed this as completed Jun 7, 2016
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

2 participants