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

Bar chart data entry #2074

Closed
ReFiRnE opened this issue Jan 13, 2017 · 1 comment
Closed

Bar chart data entry #2074

ReFiRnE opened this issue Jan 13, 2017 · 1 comment

Comments

@ReFiRnE
Copy link

ReFiRnE commented Jan 13, 2017

screen shot 2017-01-13 at 15 53 30 1
This is my current chart. I already have some custom NumberFormattor on it. But the display of values which I want active not quite what I need. Currently it's just a value which I passed to BarChartDataEntry. I wonder if I could send string there for value to display? I am looking for something similar to stringForValue. I use stringForValue where I return names for xAxis. Or if anyone have idea how I could implement formatter which is checking if x > 10.000 then display it as 10.0'(10k).

@ReFiRnE
Copy link
Author

ReFiRnE commented Jan 13, 2017

You can close case, I think I found how I could do it. Firstly I delegate IValueFormatter in ViewController. Then when I initialize BarChar tDataSet, I do valueFormatter = self. After that I can use
stringForValue(_ value: Double, entry: ChartDataEntry, dataSetIndex: Int, viewPortHandler: ViewPortHandler?) -> String
Thanks for awesome library!

@ReFiRnE ReFiRnE closed this as completed Jan 13, 2017
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