Skip to content
This repository has been archived by the owner on Dec 2, 2020. It is now read-only.

Releases: Boris-Em/BEMSimpleLineGraph

Version 4.1.1

24 Jan 21:20
Compare
Choose a tag to compare

Bug Fixes

  • Fixes #220 in accordance with Apple Documentation. Removed calls to closePath on BEMLine to prevent the lines being retraced (94f8915)
  • Fixes #233 by checking for data sources with less than two data points and drawing an appropriate line and line fill (aa51b11)

Project Changes

  • Added a great deal of in-depth XCTests (295b9cb)

Version 4.1

31 Jul 18:49
Compare
Choose a tag to compare

Improvements

  • Bezier Algorithm Improvements. This modifies the algorithm used to determine the graph's line. The old algorithm, although generating prettier graphs, displayed inaccurate information; line arcs would go above and below min/max values, and a graph that had two data points of the same value in a row would show invalid arcs between the two data points (always upward) giving the user an inaccurate representation of the data. Thanks to @tres for this wonderful improvement (9311f8d).
  • Allow gesture recognizer to function simultaneously with other gesture recognizers. (8c25436).

New Features

  • New reference line width property (referenceLineWidth) allows you to control the width of the reference lines independently from the graph line. (0bb60c9)

Bug Fixes

  • Fixes #135, an issue where bezier curve lines were not confined to the graph's boundaries (despite the fill gradients and colors being confined). (17fe25f)
  • Fixes an issue where permanent pop up labels are duplicated when layoutSubview is called (i.e. during interface orientation changes). (929df84)
  • Fixes a crash that may have occurred when attempting to perform calculations on a graph with no data, or before data is loaded. (e2a5167)
  • Fixes a static analyzer warning about uninitialized struct. (af70a96)

GitHub Repo Updates

  • Readme Updates
    • Fixes quotation mark for Swift bridging header example (978b504)

Public to Private API Transition

  • Removed previously public properties on BEMLine and made them private. These properties are not marked as deprecated because they should not have been public in the first-place, and any public use of them would have unintentional consequences. The following properties are no longer available publicly:
    • @property (assign, nonatomic) CGPoint P0
    • @property (assign, nonatomic) CGPoint P1
    • @property (assign, nonatomic) CGPoint P2
    • @property (assign, nonatomic) CGPoint P3

Version 4.0

01 May 21:10
Compare
Choose a tag to compare

Breaking Changes

  • Changed the purpose of lineGraphDidFinishLoading:.
    • Added a new lineGraphDidFinishDrawing: delegate method to differentiate between when the graph finishes drawing & animating and when it finishes loading its data.
    • Those who previously used lineGraphDidFinishLoading: to take graph snapshots should now use lineGraphDidFinishDrawing: instead.
    • The new lineGraphDidFinishDrawing: can be used to create snapshots for the  WATCH
  • Deprecated the distanceToClosestPoint method. This method will become unavailable in a future update. There will be no replacement for this method and we suggest phasing it out.
  • Removed compile-time module check (@import vs. #import). Modules are now be used by default. (a43ba93)
  • Added warnings to deprecated methods which will be removed in the next major release:
    • numberOfPointsInGraph
    • didTouchGraphWithClosestIndex:
    • didReleaseGraphWithClosestIndex:
    • numberOfGapsBetweenLabels

Semi-Breaking Changes

  • Improved the implementation of the X-Axis. The X-Axis background is now drawn by BEMSimpleLineGraph (as the Y-Axis is) instead of by BEMLine. This will help ensure stability and provide a more reliable system moving forward. It also fixes issues with gradient overlap into the X-Axis area.

Xcode 6 Improvements

  • BEMSimpleLineGraph now takes advantage of Xcode 6's new IBDesignable and IBInspectable features. Preview select graph properties in Interface Builder.
  • Starting in Xcode 6.3 and Swift 1.2, BEMSimpleLineGraph is compatible with the new NULLABILITY standards. All methods and properties are, by default, non-nullable unless otherwise marked. (a43ba93)

Key Feature

  • Average Lines (a939039). Added an Average Line feature. Draw an average line with a specific y-value. Use the new averageLine property on BEMSimpleLineGraphView to setup and customize the line. Might be considered a fix for issue #42. The implementation of the average line feature is likely the direction BEMSimpleLineGraph is headed as it expands.

New Features - Shoutout to @RobDay and his team at @dowjones for PR #132

  • New Properties
    • Optionally display only dots and no line on your graph (resolves #51) using the new displayDotsOnly property.
    • Added new positionYAxisRightproperty. A boolean flag that moves the Y-Axis to the right of the graph.
    • Added a new lineDashPatternForReference[X|Y]AxisLines property. Specify a dash pattern for the reference lines drawn on the graph. This creates the reference lines with a dotted or hashed pattern.
    • Added a new enable[Left|Right|Top|Bottom]ReferenceAxisFrameLine property. By setting these properties, you can control what reference frame lines are drawn on the graph.
    • New displayDotsWhileAnimating property. A boolean specifying whether or not to show the dots while animating the reference lines.
    • New noDataLabelColor. Specify the color for the no data label
    • New noDataLabelFont. Specify the font for the no data label
    • Created a new formatStringForValues property. A format string to apply to values in the Y-Axis. This lets you have fine-grain control over the decimal precision of these values (eg. ".02f")
    • New yAxis[Prefix|Suffix]OnLineGraph property. Specify popup prefix and suffix to show in the built-in popup view
  • Null Graph Values
    • The graph now has the ability to plot null graph values. BEMSimpleLineGraph.h now specifies a special value, BEMNullGraphValue, that corresponds to a null data point. In your response to valueForPointAtIndex, return this special value whenever your data point is null. BEMSimpleLineGraph will now skip over this value when drawing the line. If you set interpolateNullValues, the graph will connect non-null values while preserving spacing for the null value.
  • Customizing Popup Views
    • Added a popUpSuffixForlineGraph: delegate method. A suffix to append to the stock pop up label view's value.
    • Added a popUpPrefixForlineGraph: delegate method. A prefix to prepend to the stock pop up label view's value.
    • If you want to use a custom popup view instead of the built-in popup view, you can respond to the optional method popUpViewForLineGraph:. You respond to this method with a UIView that will be used in place of the default popup.
      • When you use the custom popup view, the data in the view needs to be changed whenever the user drags his or her finger. To handle this modification, BEMSimpleLineGraph will send the message lineGraph:modifyPopupView:ForIndex:. This lets you modify your view for a given datapoint.
  • Axis Customizations
    • Added a new delegate method, incrementPositionsForXAxisOnLineGraph that lets you set the specific indices where X-Axis labels should be drawn.
    • Added a new delegate method, baseIndexForXAxisOnLineGraph, that lets you specify the index of the first X-Axis label to draw.
    • incrementIndexForXAxisOnLineGraph. An increment to apply to the response.
    • baseIndexForXAxisOnLineGraph. X-Axis labels will be drawn on this increment across the X-Axis.
    • baseValueForYAxisOnLineGraph. The starting Y-Axis value to plot draw on the Y-Axis. This lets you set a specifically formatted value so that your access label can be more user friendly (21.50 instead of 21.47)
    • incrementValueForYAxisOnLineGraph- An increment value to add to the response of baseValueForYAxisOnLineGraph that specifies what Y-Axis values to draw. This lets you return a user friendly increment, eg. .25.
  • Snapshot Methods
    • Use the new graphSnapshotImageRenderedWhileInBackground: method to capture a graph snapshot while your app is in the background. Fixes #193. (512f716)
  • Animation & Drawing
    • New “expansion” animation has been added to the list of available animations. Try out the new animation with the BEMLineAnimationExpand type.

Bug Fixes

  • Fixes #134, an issue where popup suffixes would not display when alwaysDisplayPopUpLabels was set to YES. The sample app now demonstrates the use of popup suffixes. (183a675)
  • Fixes #138, an issue where popup prefixes would not display when alwaysDisplayPopUpLabels was set to YES. The sample app now demonstrates the use of popup prefixes. (c83d66c)
  • Fixes #70, a bug where reference axis frame drawing was conditional on reference axis lines being enabled. Now these properties are not dependent on one another. (f1f2ac4)
  • Fixes #196, vertical reference lines are now properly aligned with x-axis labels. (64b4fb1)
  • Fixes #67, the far-right and far-left x-axis labels now re-orient themselves to avoid being clipped.(64b4fb1)
  • Fixed an issue where the reference lines would have an alpha value of 0 if the line also had an alpha value of zero. Reference lines now set to an alpha of 0.1 when the line alpha is 0.0. As before, you can disable
    reference lines using the boolean properties to make them appear or disappear. (1acc2e2)

GitHub Repo Updates

  • Graph Properties View Controller
    • View all available public BEMSimpleLineGraph properties directly from the sample project
    • Ability to use and toggle these properties directly from the Storyboard is coming soon
  • Readme Updates
    • New Apps Using This Project Section
    • Added details on IBDesignables
    • Added contributions note
    • Improved markdown formatting
    • Added StackOverflow support details
  • Updated project requirements

Version 3.3

23 Feb 04:01
Compare
Choose a tag to compare

New Features

Performance Improvements

  • Performance improvements (019838f)
  • Decreased load time and memory overhead with 300+ dots. See issue #107 (83e79cf)

Bug Fixes

GitHub Repo Updates

Version 3.2

23 Feb 03:51
Compare
Choose a tag to compare

New Features

  • New behavior for numberOfYAxisLabelsOnLineGraph (2406512).
  • Added segmented control to select Bezier or Straight curve in sample app (c33a560).
  • Added support for negative data points (80b6b0c).
  • New property to enable/disable the XAxis labels enableXAxisLabel (5fe260e).
  • New delegate method to customize the size of the vertical padding on the graph staticPaddingForLineGraph (5ee055c).

Minor Changes

  • The "No Data" Label is now optional thanks to delegate method noDataLabelEnableForLineGraph (cb7d5bd).
  • Split property enableReferenceAxisLines into two properties for X and Y-Axis (63a1d91).

Bug Fixes

  • Fixed enableYAxisLabel (5ffaed9)
    • Fixed the way the offset on the Y-Axis label is calculated when enableYAxisLabel is set to NO.
    • Fixed the way the labels are displayed when enableYAxisLabel is set to NO.
    • Deleted the calculation of the offset distance for Y-Axis Label (since it was already done).
    • Fixed the Y-Axis labels when enableYAxisLabel is set to NO.
    • Fixed the position of the dots when enableYAxisLabel is set to NO.
  • Fixed alwaysDisplayPopUpLabels (3da4fb7)
    • Fixed issue with alwaysDisplayPopUpLabels where the background wouldn’t be displayed when the Y-axis was displayed (see issue #71).
    • Changed name of property labelYaxisOffset to YAxisLabelXOffset.
    • Fixed documentation of autoScaleYAxis.
  • Fixed popupLabel (3e3338a)
    • When the Y-Axis labels were activated, the popup label on the very edge of the Y-Axis label would display over the axis.
  • Fixed issue with bezier curve (47a583d)
    • Fixed issue where the bezier curve used to be deactivated if 3 points with the same value were following each other. See issue #73.
  • Fixed issue #73 and labels Y axis height (12587c0)
    • The issue with bezier curves should now be totally fixed.
    • The height of the labels on the Y-axis has been increased to make sure the could display all the text.
  • Fix representation of negative values in Y axis (0e586b9)
  • Fix incorrect presentation of years in code example (d36074d)

Version 3.1

29 Aug 04:00
Compare
Choose a tag to compare

New Features

  • Added new properties to control the following:
    • Background Color of Axis
    • Alpha of Axis

Bug Fixes

  • Fixed Issue #61
  • Fixed Issue #62

Version 3.0

19 Aug 05:35
Compare
Choose a tag to compare

Breaking Changes

  • Separated the delegate into a delegate and a data source. This provides additional flexibility and brings BEMSimpleLineGraph even closer to UITableView and UICollectionView. Data source methods which were previously delegate methods are now marked as deprecated and unavailable. Implementing a data source method on the delegate will throw an exception.
  • Deprecated lineColorForIndex: due to the nature of the new graph mechanics. There is no replacement for this method at this time and implementing it will have no effect.
  • Deprecated lineAlphaForIndex: due to the nature of the new graph mechanics. There is no replacement for this method at this time and implementing it will have no effect.

Performance Improvements

  • The line graph is now drawn in a completely different way, using UIBezierPaths instead of multiple UIViews. The result is a ~90% improvement in performance and memory usage. This major change resolves #34. And here's a little chart for comparison:

    Version 2.3 Version 3.0
    120 MB memory usage at 100 points 6 MB memory usage at 100 points
    25 data points stable maximum 250+ data points stable maximum
    Choppy Animation Smooth Animations

New Features

  • Added labels and scaling features for the Y-Axis
  • Added multiline X-Axis labels
  • Optionally draw thin, translucent reference lines on the graph behind the main line
  • Added optional axis frames to draw a thin, translucent border between the graph and the axis labels
  • Popovers can now be displayed indefinitely
  • Choose between three different graph animation options (draw, fade, or none)
  • New delegate method to provide optional suffix for pop-up points

Bug Fixes

  • Bezier corners are now buttery-smooth (Fixed #22)
  • Error handling when drawing the graph without data points

Resolved Issues
This update resolves the following issues: #19, #22, #24, #26, #28, #30, #33, #34, #37, #40, and #41.

Known Issues
There are no known issues in this release.

Version 2.3

02 Jun 02:59
Compare
Choose a tag to compare

Bug Fixes

  • Fixed index beyond bounds when touching the graph (#31)

Known Issues
The following issues are know to be present in version 2.3. Some of these issues may also be present in earlier versions. Each known issue is being tracked and worked on (see the issue numbers). Issues marked with an F have been resolved on the feature branch.

  • Numerous data points cause high memory consumption and warnings (#34 F)
  • Glitches appear on bezier corners (#22 F)
  • X-Axis labels may display underneath the graph (#47)
  • Straight lines appear with extra curves (#21)
  • Exception thrown when number of X-Axis label is not good (#46)

Version 2.2

19 May 00:37
Compare
Choose a tag to compare

Minor Breaking Changes

  • lineColorForIndex & lineAlphaForIndex are now deprecated in preparation of new update. These features will no longer be supported

New Features

  • Added new feature PopUpReport: when the user touches the graph, a label will show up above the closest point giving the value of this point.
  • Added public properties sizePointand colorPoint to control the diameter and color of the points creating the graph.

Bug Fixes

  • Various bug fixes (#18, #15)

Version 2.1

20 Apr 05:25
Compare
Choose a tag to compare

Bug Fixes

  • Fixed the bug with Target Membership. See issue #14.
  • Misc bug fixes.

Minor Enhancements

  • Support for adding a graph in UIScrollView. Thank you to @nmattisson. See issue #12.