This repository has been archived by the owner on Dec 2, 2020. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Interface Initialization
Added initializer so that the line chart could be added via Storyboard (in addition to programmatically). Now uses both
initWithFrame:
andinitWithCoder:
, as opposed to onlyinitWithFrame:
. This allows the graph to be setup completely in the interface. Thedelegate
property was also changed to anIBOutlet
so that it could be set from the interface (it can still be set programmatically too).Reloading Data
Added new
reloadGraph
method. This new method will reload the data source of graph, and all of its properties. This allows for more dynamic graphs that change after they've been created. ThereloadGraph
method is almost identical (in functionality) to the UITableView methodreloadData
.Sample App
The sample app has been updated to reflect the changes made above. In the update sample app, the graph is setup using the interface. A Refresh button and Refresh Settings have also been added to exhibit the capabilities of the
reloadGraph
method.Documentation
Also made documentation improvements. Regular code comments have been converted to documentation comments. Plus, improvements have been made to the
Readme.md
to describe (in better formatting and detail) how BEMSimpleLineGraph works.Note on File Duplicates
While reviewing the pull request you may notice that a substantial number of files were deleted. Don't worry though, nothing really got deleted. I simply removed duplicate files and then relinked everything in Xcode. So now when you modify the files in the sample app, you don't need to copy the changes to the external folder (or vice versa). Now there's only one file to change, not two.
A BIG Thanks
And thank you for this fantastic project! This is definitely one of the best line graph projects available on GitHub, or anywhere. Thanks for project and the work that you put into it. I'll be using it in one of my upcoming apps! Keep it up!