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

Changed comment that referenced getFormattedValue() method in IValueFormatter #3518

Merged

Conversation

JCMcLovin
Copy link
Contributor

Updated the documentation markup in the IValueFormatter protocol by changing the reference to getFormattedValue() to the newer stringForValue() method.

IValueFormatter had a comment suggesting that you can override the getFormattedValue(…) method but that method doesn’t exist. The comment has been removed.
Adding back the comment but revised it to refer to the stringForValue() method  in the IValueFormatter protocol. I know, I know, it should have been obvious but @philfi had to point it out to me.
@codecov-io
Copy link

codecov-io commented Jun 15, 2018

Codecov Report

Merging #3518 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3518   +/-   ##
=======================================
  Coverage   29.26%   29.26%           
=======================================
  Files         117      117           
  Lines       13277    13277           
=======================================
  Hits         3886     3886           
  Misses       9391     9391

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0d33db4...e1f3b71. Read the comment docs.

@@ -24,12 +24,10 @@ public protocol IValueFormatter: class
///
/// For performance reasons, avoid excessive calculations and memory allocations inside this method.
///
/// - returns: The formatted label ready for being drawn
/// - returns: The formatted label ready to be drawn
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

weird spaces. please fix.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

///
/// - parameter value: The value to be formatted
///
/// - parameter axis: The entry the value belongs to - in e.g. BarChart, this is of class BarEntry
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add correct parameter here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe 'axis' was a parameter for getFormattedValue but it's not a parameter for stringForValue. This is why I removed it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I will add something for the 'entry' parameter.

///
/// Then override the getFormattedValue(...) method and return whatever you want.
/// Simply create your own formatting class and let it implement ValueFormatter. Then override the stringForValue()
/// method and return whatever you want.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this is github display issue or your code. /// method and return whatever you want. in a new line is strange to me

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@JCMcLovin
Copy link
Contributor Author

@liuxuan30 - Sorry but I'm new to this. Do I push the changes to the existing PR or create a new PR?

@liuxuan30
Copy link
Member

@JCMcLovin sorry to be late. You just push to your branch JCMcLovin:getFormattedValue-stringForValue. everything will be refreshed in this PR.

@pmairoldi
Copy link
Collaborator

@liuxuan30 this good to merge?

@JCMcLovin
Copy link
Contributor Author

@petester42 I need to push a very minor change now that I know I should just push to my branch (my first PR). I will do this as soon as I’m back at my computer.

@JCMcLovin
Copy link
Contributor Author

JCMcLovin commented Aug 1, 2018

I've pushed the final change. Good to merge.

@pmairoldi
Copy link
Collaborator

You sure you pushed to the correct branch? Last commit is from June.

@JCMcLovin
Copy link
Contributor Author

Yeah, it’s the latest. It took a long time to get an answer about if I just push the new commit or create a new PR and then I dragged my feet for a while after I got the answer.

@pmairoldi
Copy link
Collaborator

Thanks 👍

@pmairoldi pmairoldi merged commit 4fca1f7 into ChartsOrg:master Aug 1, 2018
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

Successfully merging this pull request may close these issues.

4 participants