Commit Graph
46 Commits
Author SHA1 Message Date
+2 d2bf08fdd6 Resolve conflict for 4.0 branch and master (#4456)
* Remove java interface convention (#2997)

* Renamed `IMarker` to `Marker`

following Swift API guidelines.

* Renamed `IAxisValueFormatter` to `AxisValueFormatter`

* Renamed `IFillFormatter` to `FillFormatter`

* Renamed `IValueFormatter` to `ValueFormatter`

* Renamed `IHighlighter` to `Highlighter`

* Renamed `I*DataSet` to `*DataSetProtocol` to follow Swift API guidelines

* Fixed naming of `LineRadarChartDataSetProtocol` and `RadarChartDataSetProtocol` from previous commit

* Renamed "Interfaces" to "DataProviders" for clarity

* Updated Demos to for new type naming

* Renderer protocols (#3136)

* Renderer is now a protocol

Renamed Renderers, and organized the Renderer folder.

* DataRenderer is now a protocol

* AxisRenderer is now a protocol

* Chartviewbase redundant ivar (#3045)

* Fixed using wrong axis (Issue #2257)

* fix #1830. credit from https://github.com/danielgindi/Charts/pull/2049 (#2874)

* fix #1830. credit from https://github.com/danielgindi/Charts/pull/2049

* add combined chart unit tests for iOS, tvOS (macOS only have build process)

* use iterater rather than index

* Removed redundant ivars in BarLineChartViewBase (#3043)

* Removed redundant ivars in favour of proper access control

* Moved initialization of axes to their declaration to keep the same optionality exposed.

* Update 4.0.0 with master (#3135)

* Replaced relevant `ChartUtils` methods with `Double` extensions (#2994)

* Replaced relevant `ChartUtils` methods with `Double` extensions

Improves readability.
`nextUp` is built in and provides the same functionality.

* Updated `ChartUtilsTests` to match changes

* add option to build demo projects unit tests on iOS (#3121)

* add option to build demo projects unit tests on iOS

* add ChartsDemo-OSX build test.

* Update ViewPortHandler.swift (#3143)

fix a small bug

* Refactored ChartUtils method into CGPoint extension (#3087)

* Refactored ChartUtils method into CGPoint extension

* Replaced ChartUtils.defaultValueFormatter()

* Codestyle fixes

* ChartViewBase cleanup

For the most part, condensing logic and using `guard` where appropriate
Removed optionality of many internal variables as they were only optional to allow for deferred initialization. This is now replaced with lazy vars.
Removed empty initializer overrides.
`fileprivate` is now `private`

* Removed redundant ivars

In favour of proper access control

* Fixes after merge

* Renamed `animator` to `chartAnimator`

on `ChartViewBase` to no conflict with `NSView`'s `animator()` method.

* pulled latest master

* Code style fix

* Removed AxisRendererBase.swift

* Fixed demos

* BarChartRenderer Logic cleanup (#3008)

* Logic cleanup

Mostly using guard where appropriate
Few very minor performance improvements

* Made use of `==` where appropriate to simplify logic

* Returned fatalError message

* Replaced `Buffer` class

with simple typealias. There was only one instance where reference semantics might have be helpful, but was easily reimplemented with value semantics.

* Syncing 4.0.0 with master (#3160)

* Fixed using wrong axis (Issue #2257)

* fix #1830. credit from https://github.com/danielgindi/Charts/pull/2049 (#2874)

* fix #1830. credit from https://github.com/danielgindi/Charts/pull/2049

* add combined chart unit tests for iOS, tvOS (macOS only have build process)

* use iterater rather than index

* Removed redundant ivars in BarLineChartViewBase (#3043)

* Removed redundant ivars in favour of proper access control

* Moved initialization of axes to their declaration to keep the same optionality exposed.

* Update 4.0.0 with master (#3135)

* Replaced relevant `ChartUtils` methods with `Double` extensions (#2994)

* Replaced relevant `ChartUtils` methods with `Double` extensions

Improves readability.
`nextUp` is built in and provides the same functionality.

* Updated `ChartUtilsTests` to match changes

* add option to build demo projects unit tests on iOS (#3121)

* add option to build demo projects unit tests on iOS

* add ChartsDemo-OSX build test.

* Update ViewPortHandler.swift (#3143)

fix a small bug

* Refactored ChartUtils method into CGPoint extension (#3087)

* Refactored ChartUtils method into CGPoint extension

* Replaced ChartUtils.defaultValueFormatter()

* Codestyle fixes

* Minor cleanup to Highlighter types (#3003)

* Minor cleanup to Highlighter types

* Fixes for PR

* Pulled master and updated code style

* added DataApproximator+N extension (#2848)

* added DataApproximator+N extension

* fixed PR notes

* Readded in missing files

* Moved ChartUtils drawing methods into CGContext extension (#3086)

* Fixed using wrong axis (Issue #2257)

* fix #1830. credit from https://github.com/danielgindi/Charts/pull/2049 (#2874)

* fix #1830. credit from https://github.com/danielgindi/Charts/pull/2049

* add combined chart unit tests for iOS, tvOS (macOS only have build process)

* use iterater rather than index

* Removed redundant ivars in BarLineChartViewBase (#3043)

* Removed redundant ivars in favour of proper access control

* Moved initialization of axes to their declaration to keep the same optionality exposed.

* Update 4.0.0 with master (#3135)

* Replaced relevant `ChartUtils` methods with `Double` extensions (#2994)

* Replaced relevant `ChartUtils` methods with `Double` extensions

Improves readability.
`nextUp` is built in and provides the same functionality.

* Updated `ChartUtilsTests` to match changes

* add option to build demo projects unit tests on iOS (#3121)

* add option to build demo projects unit tests on iOS

* add ChartsDemo-OSX build test.

* Update ViewPortHandler.swift (#3143)

fix a small bug

* Refactored ChartUtils method into CGPoint extension (#3087)

* Refactored ChartUtils method into CGPoint extension

* Replaced ChartUtils.defaultValueFormatter()

* Codestyle fixes

* Minor cleanup to Highlighter types (#3003)

* Minor cleanup to Highlighter types

* Fixes for PR

* Pulled master and updated code style

* added DataApproximator+N extension (#2848)

* added DataApproximator+N extension

* fixed PR notes

* Moved drawing methods into CGContext extension

Much nicer call sites.
Renamed some parameter names.
Removed `NSAttributedStringKey` where type inference was sufficient.
Minor tidy of drawText calls in AxisRenderers

* Pulled latest master

* Pulled master

* Fixed code style

* Utils Cleanup (#3054)

* Cleanup

Replaced unnecessary getters with proper access control
Replaced unnecessary convenience inits with default parameters
Minor refactoring

* Pulled latest master

* Pulled latest master

* Pulled latest master

* Fix after pulling master

* Fixed using wrong axis (Issue #2257)

* fix #1830. credit from https://github.com/danielgindi/Charts/pull/2049 (#2874)

* fix #1830. credit from https://github.com/danielgindi/Charts/pull/2049

* add combined chart unit tests for iOS, tvOS (macOS only have build process)

* use iterater rather than index

* Removed redundant ivars in BarLineChartViewBase (#3043)

* Removed redundant ivars in favour of proper access control

* Moved initialization of axes to their declaration to keep the same optionality exposed.

* Update 4.0.0 with master (#3135)

* Replaced relevant `ChartUtils` methods with `Double` extensions (#2994)

* Replaced relevant `ChartUtils` methods with `Double` extensions

Improves readability.
`nextUp` is built in and provides the same functionality.

* Updated `ChartUtilsTests` to match changes

* add option to build demo projects unit tests on iOS (#3121)

* add option to build demo projects unit tests on iOS

* add ChartsDemo-OSX build test.

* Update ViewPortHandler.swift (#3143)

fix a small bug

* Refactored ChartUtils method into CGPoint extension (#3087)

* Refactored ChartUtils method into CGPoint extension

* Replaced ChartUtils.defaultValueFormatter()

* Codestyle fixes

* Finished cleanup

* Pulled master

* Chartdata collection conformance (#3023)

* Added Collection conformances

MutableCollection
RandomAccessCollection
RangeReplaceableCollection

* Fixed required initializers

* ChartData adopts ExressibleByArrayLiteral

* Updates for PR

Also added remove subrange.

* PR review fixes

* Removed unnecessary `get` from subscripts.

* Disabled `remove(at:)` for CombinedChartView

* Relocated `appendEntry(_:todataSet:)`

* Removed methods from CombinedChartData

* weak -> unowned (#3039)

* weak -> unowned

`ViewPortJob`s are owned by the Charts that make them. They are guaranteed to only exist while the chart exists. The `Transformer` and `ViewPortHandler` are supplied by the chart, so they will also only exist while the chart exists. Therefor none of them need to be `weak`, but can be `unowned` instead. It's a minor change in the code base (removing some guard statements), but it makes it much easier to discern how the framework is architected.

* pulled latest master

* Removed optionality from valueFormatter where appropriate (#3106)

* Removed optionality from valueFormatter where appropriate

In ChartBaseDataSet, `valueFormatter` never returned nil, and escaped early if trying to set it to nil. It appears this was made optional solely to provide lazy initialization. We now use a lazy var instead.

In AxisBase, the backing var `_axisValueFormatter` would never be treated as nil, and appears to be made optional solely to provide lazy initialization. We now use a lazy var instead. In `valueFormatter` we can remove the `nil` check, but leave it optional to keep the same functionality.

* Pulled 4.0.0

* Pulled latest 4.0.0

* Fixed pro file

* Chartdata collection refactor (#3024)

* Added Collection conformances

MutableCollection
RandomAccessCollection
RangeReplaceableCollection

* [#3018] Refactored use of `ChartData` to use new `Collection` conformances

* Fixed required initializers

* ChartData adopts ExressibleByArrayLiteral

* Modified demos to take advantage of collection conformance.

* Removed unnecessary `get` from subscripts.

* Removed redundant methods

* Relocated `appendEntry(_:todataSet:)`

* Removed methods from CombinedChartData

* Moved the default value formatter (#3088)

* Moved the default value formatter

It is now simply `DefaultValueFomatter()`
Removed unnecessary backing ivars in `DefaultValuetFormatter` in favour of property observers
Deprecated static func constructor in favour of initializer

* Add option to rotate value text for line charts

* Add value text rotation for bar charts

* Add value text rotation for other charts

* Fixed misuse/deprecation of "!" operator

* Updated projects for Xcode 9.3 and Swift 4.1
added a workspace to include all demos with the project to make it easier to test changes

* Pulled master

* Moved travis to Xcode 9.3beta temporarily

* Updated Rakefile for new project names

* Updated demo imports

* Rename valueRotationAngle -> valueLabelAngle

* Make function private & remove line break

* Refactored ChartData (#3169)

* Added Collection conformances

MutableCollection
RandomAccessCollection
RangeReplaceableCollection

* [#3018]

Refactored use of `ChartData` to use new `Collection` conformances

* Fixed required initializers

* ChartData adopts ExressibleByArrayLiteral

* Modified demos

to take advantage of collection conformance.

* Updates for PR

Also added remove subrange.

* Refactored ChartData

Removed redundancy from min/max logic.
Lots of naming changes.
Cleaner implementations.

* PR review fixes

* Removed unnecessary `get` from subscripts.

* Disabled `remove(at:)` for CombinedChartView

* Removed redundant methods

* Relocated `appendEntry(_:todataSet:)`

* pulled latest 4.0.0

* Disabled Collection support for CombinedChartData

* Removed methods from CombinedChartData

* Pulled latest 4.0

* Fixes after merge

* Removed used of dataSet(forIndex:)

* Fixed merge conflicts

* Fixed merge conflicts

* updated demos

* Pulled latest 4.0.0

* Fixed demos

* Fixed objective c demos

* Moved travis to Xcode 9.3 beta temporarily

* Fixed macOS demo info.plist and tv demo device name

* PR Fixes

* Fixed objective-c naming

* PR Fixes

* fix comment

* Remove unnecessary file (#3432)

* Dataset logic cleanup (#3001)

* Cleaned up `ChartDataSet` logic

Added TODOs for areas where simple changes can help improve Swift consistency.

* Tidied up logic for `ChartDataSet` subclasses

Minor changes to take advantage of Swift features and help improve readability.

* Added Collection conformances

MutableCollection
RandomAccessCollection
RangeReplaceableCollection

* [#3018]

Refactored use of `ChartData` to use new `Collection` conformances

* Fixed required initializers

* ChartData adopts ExressibleByArrayLiteral

* Modified demos

to take advantage of collection conformance.

* Pulled latest master

* Pulled latest master

* Updates for PR

Also added remove subrange.

* Refactored ChartData

Removed redundancy from min/max logic.
Lots of naming changes.
Cleaner implementations.

* PR review fixes

* Removed unnecessary `get` from subscripts.

* Disabled `remove(at:)` for CombinedChartView

* Removed redundant methods

* Relocated `appendEntry(_:todataSet:)`

* pulled latest 4.0.0

* Disabled Collection support for CombinedChartData

* Removed methods from CombinedChartData

* Pulled latest 4.0

* Fixes after merge

* Removed used of dataSet(forIndex:)

* Fixed merge conflicts

* Fixed merge conflicts

* updated demos

* Pulled latest 4.0.0

* Fixed demos

* Fixed objective c demos

* Moved travis to Xcode 9.3 beta temporarily

* Fixed macOS demo info.plist and tv demo device name

* PR Fixes

* Fixed objective-c naming

* PR Fixes

* PR Fixes

* Added gradient line drawing to LineChartRenderer

* Stabilize and clean the code

* Extract line drawing into function

* Fix macOS build

* Move `drawGradientLine` out of `drawLine` method

* Remove unused parameters from `drawLine` function

* Fix gradient location calculation

* Add toggle gradient line into demo options

* Improvements after code review

* Code cleanup

* Remove unnecessary function for generating gradient line

- additional code optimizations

* Fix: gradient lines peaks are truncated when line width > 1

* Make legendRenderer property public in order to be externally customizable

* fix build issue in objc demo

* Add minimum slice angle for value labels to PieChartView

* Rename drawSliceTextMinimumAngle to sliceTextDrawingThreshold

* Fix sliceTextDrawingThreshold renaming in demo

* fix build of demos

* Add label colors to legend entries (#3558)

* add label colors to legend entries

* Change interface of LegendEntry

* Add Swift version 4.1 to podspec

* Turned  gradient components and locations into constants (#3775)

* Cleaned up `ChartDataSet` logic

Added TODOs for areas where simple changes can help improve Swift consistency.

* Added Collection conformances

MutableCollection
RandomAccessCollection
RangeReplaceableCollection

* [#3018]

Refactored use of `ChartData` to use new `Collection` conformances

* Fixed required initializers

* ChartData adopts ExressibleByArrayLiteral

* Modified demos

to take advantage of collection conformance.

* Pulled latest master

* Unified Style

Replaced custom algorithms with built-in ones
Made axis renderer implementations feel "Swift-ier"

* Updates for PR

Also added remove subrange.

* Refactored ChartData

Removed redundancy from min/max logic.
Lots of naming changes.
Cleaner implementations.

* Fixed horizontal barchart bug,

* Removed unnecessary `get` from subscripts.

* Disabled `remove(at:)` for CombinedChartView

* Relocated `appendEntry(_:todataSet:)`

* Disabled Collection support for CombinedChartData

* Removed used of dataSet(forIndex:)

* Fixed merge conflicts

* updated demos

* PR Fixes

* Fixed axisLabels calculation

* Fill rewrite (#3084)

close #3140
* Fill is now a protocol

Different fill logic is broken up into separate classes. This has a few benefits:
1. It makes the `Fill` types more readable (logic is grouped together)
2. No optionals
3. Most importantly it allows consumers to create new Fill types without looking into the framework.

* Added super.init() for objc

* Updated Fill access

No need to subclass existing fills now that the system is more flexible. If functionality is needed from another fill, user can call it within their own `fillPath(context: CGContext, rect: CGRect)` implementation.

* Updated Fill Names

* Update Fill.swift

update code style

Co-authored-by: Jacob Christie <jchristie@christie.teamspace.ad>
Co-authored-by: Xuan <liuxuan30@gmail.com>

* update to Swift 5, Xcode 13.5.1, and fix warnings

* fix all compile errors and wrong symbols either by git or me.

* revert back to convenience init for BarChartDataSet
fix ChartDataTests compile errors: use new API dataSet(forLabel:, ignorecase: )

* actually, I compared the old master and find this is a mistake while merging to make init(label:) in BarChartDataSet. It should be in ChartDataSet.

* fix -0.0 issue in 4.0 merge. fix func calculateLegendOffsets in BarLineChartViewBase due to mistaking added back offsetBottom += xAxis.labelRotatedHeight. see #4277 for details
now bar & horizontal bar chart tests should pass.

* fix pie chart UT failures. didSet will no be called in init(), so we call it manually
also fix set.valueFormatter in data setter

* fix line chart UT failures

* Remove `isIndirectValuesCall`

* Bump Travis to Xcode 12

* Remove misuse of `count` (#4461)

* Remove misuse of `count`

* Fix protocol method name

* Update ChartColorTemplates.swift

use fallbackColor for `colorFromString()`

* Revert "Update ChartColorTemplates.swift"

This reverts commit b4111fd39b.

Co-authored-by: Xuan <liuxuan30@gmail.com>

* switch to source compiling swift code

* fix Carthage error after changing to source compile. https://github.com/Carthage/Carthage/issues/3019

there is a workaround mentioned [here](https://github.com/Carthage/Carthage/issues/3019#issuecomment-665136323)
making travis to build from carthage.sh until the root issue is fixed.

* update project settings

* recreate iOS+tvOS images due to iOS14 SDK uncertain changes.

* Remove unnecessary ternary in boolean expression (#4435)

* Remove internal use of datasets (#4459)

* Remove internal use of ChartData.dataSets

* Rebased onto ResolveConflicts

* Remove duplicated line

Co-authored-by: jjatie <j.christie@icloud.com>
Co-authored-by: ctran <chinh.tran@mail.de>
Co-authored-by: larryonoff <larryonoff@gmail.com>
Co-authored-by: Jacob Christie <jakechristie@dal.ca>
Co-authored-by: Katalin Nagy <nagy.katalin@codespring.ro>
Co-authored-by: Pierre-Marc Airoldi <pierremarcairoldi@gmail.com>
Co-authored-by: Marshall Weir <marshall.weir@gmail.com>
Co-authored-by: Jacob Christie <jacob.christie@kinduct.com>
Co-authored-by: Jacob Christie <19879272+jjatie@users.noreply.github.com>
Co-authored-by: Jacob Christie <jchristie@christie.teamspace.ad>
Co-authored-by: BJ Miller <2272819+SixFiveSoftware@users.noreply.github.com>
2020-10-30 16:04:35 -03:00
Xuan Liu 8bb20b6b9d update podspec 2020-09-21 15:23:41 +08:00
Xuan Liu 522c1bd5ea bump version to 3.5.0 2020-04-16 16:35:22 +08:00
Xuan Liu 2b3bed5f3f bump to 3.4.0 2019-10-09 10:46:05 +08:00
Xuan Liu cd1120b004 correct 3.3 to 3.3.0. 2019-04-24 10:50:43 +08:00
Xuan Liu 2bde78fb35 bump version to 3.3 2019-04-15 09:35:57 +08:00
Xuan Liu deae18583b bump version to 3.2.2 2019-02-13 09:19:47 +08:00
Pierre-Marc Airoldi fbec767b7d bump version to 3.2.1 2018-10-08 15:52:03 -04:00
Pierre-Marc Airoldi 86ae253849 close #3661: update podspec to include swift verison 2018-10-02 19:27:00 -04:00
Pierre-Marc Airoldi 98a472cf77 migrate to swift 4.2 2018-09-16 21:26:04 -04:00
Xuan Liu 6b730a035c bump to 3.1.1 for Xcode 9.3 2018-04-02 16:10:22 +08:00
Xuan Liu 7c4c16e36b update pod spec to 3.1.0
update changelog to v3.1
2018-03-22 10:59:10 +08:00
Xuan Liu 5d8b81bdb4 bump pod version 2018-01-08 10:16:55 +08:00
M. Porooshani 4053e7cecc Bumped pod spec version 2017-09-21 09:33:43 +04:30
Pierre-Marc Airoldi 983d556bbc bump version 2017-09-07 22:01:28 -04:00
Daniel Cohen Gindi 1ed15615aa v3.0.2 2017-04-02 15:45:37 +03:00
Daniel Cohen Gindi 343e4daa86 Moved Realm stuff to https://github.com/danielgindi/ChartsRealm 2017-04-02 14:58:02 +03:00
Pierre-Marc Airoldi 4a3b28d0b4 loosen realm version requirement 2017-03-26 19:20:12 -04:00
Kim de Vos a069ab57d8 Updated to use Realm version 2.4.3 2017-02-24 19:47:56 +01:00
Christopher Cai 1f26720eab Update RealmSwift Dependency 2017-01-11 21:54:13 +08:00
Daniel Cohen Gindi 5d9c81ab7f 3.0.1 release 2016-11-20 11:49:25 +02:00
Pierre-Marc Airoldi cfb79ae659 fix cocoapod setup being broken 2016-09-21 00:57:48 -04:00
Pierre-Marc Airoldi 7169680e49 Revert "fix cocoapod setup"
This reverts commit 95ea820c3a.
2016-09-21 00:41:53 -04:00
Pierre-Marc Airoldi 95ea820c3a fix cocoapod setup
remove the prepare command since its not needed. To lint pod you need to set (export FORK_XCODE_WRITING=true) to get around the prepare_command issue with realm. Update cocoapods and include a swift-version file for safety
2016-09-21 00:05:36 -04:00
Pierre-Marc Airoldi 5371f97848 update podspec 2016-09-16 20:27:18 -04:00
Pierre-Marc Airoldi 89afdc3c48 update podspec source paths 2016-09-08 21:52:24 -04:00
Xuan Liu 6b29503d8d fix pod spec typo 2016-07-27 08:46:00 +08:00
Xuan Liu d8e60fe8df update Realm pod spec to 1.0.2 2016-07-26 09:27:05 +08:00
Daniel Cohen Gindi 276076f118 Version 2.2.5 release 2016-05-30 09:48:43 +03:00
Daniel Cohen Gindi f38ea99dbf Version 2.2.4 release 2016-03-31 23:10:57 +03:00
Daniel Cohen Gindi 1788e53f22 Version 2.2.3 release 2016-02-29 08:37:25 +02:00
Pierre-Marc Airoldi 3068984a83 fixes realm issues 2016-02-08 23:37:47 -05:00
Pierre-Marc Airoldi 3a486aef94 release 2.2.1 2016-02-01 10:39:58 -05:00
Pierre-Marc Airoldi 771c23632e update pod spec for relam
- changes podspec format to include the realm subspec
- adds cocoapods to gemfile
- updates readme to include realm pod spec
2016-01-30 00:21:01 -05:00
Daniel Cohen Gindi 8b91b30dd8 Bumped to 2.2.0 2016-01-26 20:08:56 +02:00
Daniel Cohen Gindi 1364bb2b96 Bumped to 2.1.6 2015-11-02 23:08:44 +02:00
Pierre-Marc Airoldi 91bb0cb1ff update targets to build framework with same name
Simplified the resulting framework so that there is not ChartsTV
framework. Only a Charts framework. Fixed that the tv framework didn’t
build.
2015-10-23 15:25:48 -04:00
Daniel Cohen Gindi 3da826022d Bumped to 2.1.5 2015-10-16 00:46:20 +03:00
Daniel Cohen Gindi dc9f4b6951 Bumped to 2.1.4a
Because of a Radar chart endless loop bug
2015-10-02 09:03:33 +03:00
Daniel Cohen Gindi 7b8507750c Bumped to 2.1.4 2015-09-22 00:13:55 +03:00
Pierre-Marc Airoldi 208d82a690 bump podspec to 2.1.3
fixes #289
2015-08-09 23:19:17 -04:00
Pierre-Marc Airoldi 2e1296622a updated podspec 2015-07-29 10:28:34 -04:00
Daniel Cohen Gindi 36641ece4c Bumped to 2.1.2 2015-07-26 22:55:20 +03:00
Daniel Cohen Gindi 8353646077 Bumped to 2.1.1 2015-07-26 20:55:31 +03:00
Daniel Cohen Gindi 3c0775caac Bumped to 2.1.0 2015-05-05 20:05:34 +03:00
Pierre-Marc Airoldi 09bb4986fe added podspec 2015-04-08 09:30:20 -04:00