diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
new file mode 100644
index 0000000000..1878f561b1
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE.md
@@ -0,0 +1,33 @@
+> ℹ Please fill out this template when filing an issue.
+> All lines beginning with an ℹ symbol instruct you with what info we expect. You can delete those lines once you've filled in the info.
+>
+> Per our [*CONTRIBUTING guidelines](https://github.com/jjatie/Charts/blob/master/CONTRIBUTING.md), we use GitHub for
+> bugs and feature requests, not general support. Other issues should be opened on Stack Overflow with the tag [`ios-charts`.](https://stackoverflow.com/questions/tagged/ios-charts)
+>
+> Please remove this line and everything above it before submitting.
+
+* [ ] I've read, understood, and done my best to follow the [*CONTRIBUTING guidelines](https://github.com/jjatie/Charts/blob/master/CONTRIBUTING.md).
+
+## What did you do?
+
+ℹ Please replace this with what you did.
+
+## What did you expect to happen?
+
+ℹ Please replace this with what you expected to happen.
+
+## What happened instead?
+
+ℹ Please replace this with of what happened instead.
+
+## Charts Environment
+
+**Charts version/Branch/Commit Number:**
+**Xcode version:**
+**Swift version:**
+**Platform(s) running Charts:**
+**macOS version running Xcode:**
+
+## Demo Project
+
+ℹ Please link to or upload a project we can download that reproduces the issue.
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
new file mode 100644
index 0000000000..30eee84561
--- /dev/null
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,13 @@
+### Issue Link :link:
+
+
+### Goals :soccer:
+
+
+
+### Implementation Details :construction:
+
+
+
+### Testing Details :mag:
+
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5c0c0cff2f..1a915ce1e6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,17 +1,61 @@
# Change Log
-## [Unreleased](https://github.com/danielgindi/Charts/tree/HEAD)
-
-[Full Changelog](https://github.com/danielgindi/Charts/compare/v3.0.5...HEAD)
+## [v3.1.0](https://github.com/danielgindi/Charts/tree/v3.1.0) (2018-03-22)
+[Full Changelog](https://github.com/danielgindi/Charts/compare/v3.0.5...v3.1.0)
**Fixed bugs:**
+- Bug in ZoomViewJob? [\#3299](https://github.com/danielgindi/Charts/issues/3299)
+- BarChartView bug if set barWidth was 1.0? [\#3213](https://github.com/danielgindi/Charts/issues/3213)
- Scatter circle disappear when chart scaled [\#3185](https://github.com/danielgindi/Charts/issues/3185)
+- PieChart `highlightValue\(x:y:dataSetIndex:\)` should provide error for dataSetIndex \> 1 [\#3146](https://github.com/danielgindi/Charts/issues/3146)
+- PieChart size is extremely small in a UITableViewCell [\#3108](https://github.com/danielgindi/Charts/issues/3108)
- Handling critical Y values with autoScaleMinMaxEnabled [\#2053](https://github.com/danielgindi/Charts/issues/2053)
- Charts 3.0 - Error: this application, or a library it uses, has passed an invalid numeric value \(NaN, or not-a-number\) to CoreGraphics API and this value is being ignored [\#1626](https://github.com/danielgindi/Charts/issues/1626)
**Closed issues:**
+- Programatically passed renderer is corrupting animations [\#3349](https://github.com/danielgindi/Charts/issues/3349)
+- How to show Integer value [\#3346](https://github.com/danielgindi/Charts/issues/3346)
+- Does not build on Xcode 8.3.3 & Swift 3 [\#3341](https://github.com/danielgindi/Charts/issues/3341)
+- how to use pod 'Charts' into objective c project , i create header file to use swift , but what should i do after create header file ? [\#3338](https://github.com/danielgindi/Charts/issues/3338)
+- How to show all labels in xAxis ? [\#3337](https://github.com/danielgindi/Charts/issues/3337)
+- How to set the interval in X axis label [\#3335](https://github.com/danielgindi/Charts/issues/3335)
+- Line chart with solid and dashed line [\#3334](https://github.com/danielgindi/Charts/issues/3334)
+- Code signing is required for product type 'Application' in SDK 'iOS 11.2' [\#3333](https://github.com/danielgindi/Charts/issues/3333)
+- My project within framework target and pod Charts into my framework target can't load Charts framework [\#3328](https://github.com/danielgindi/Charts/issues/3328)
+- Swift 4.1 compilation warnings [\#3323](https://github.com/danielgindi/Charts/issues/3323)
+- Two Horizontal grid lines always appear above Base Axis line [\#3322](https://github.com/danielgindi/Charts/issues/3322)
+- BalloonMarker support swift 3 ? [\#3321](https://github.com/danielgindi/Charts/issues/3321)
+- Unable to get horizontal scrolling in bar chart [\#3319](https://github.com/danielgindi/Charts/issues/3319)
+- Horizontal Bar Chart xAxis formatted label textColor [\#3317](https://github.com/danielgindi/Charts/issues/3317)
+- Wrong dataSetIndex in stringForValue delegate method [\#3314](https://github.com/danielgindi/Charts/issues/3314)
+- Limit line in the left and right drag or zoom can be fixed [\#3313](https://github.com/danielgindi/Charts/issues/3313)
+- Save picture crash in demos on iOS 11+ [\#3311](https://github.com/danielgindi/Charts/issues/3311)
+- How to display reload text in iOS-Charts? [\#3310](https://github.com/danielgindi/Charts/issues/3310)
+- Can't show Label text in XAxis [\#3308](https://github.com/danielgindi/Charts/issues/3308)
+- Straight lines [\#3306](https://github.com/danielgindi/Charts/issues/3306)
+- Values on X axis issue [\#3304](https://github.com/danielgindi/Charts/issues/3304)
+- when setInverted\(true\) in the leftAxis of CombinedChart, the candleStickData doesnot show ? [\#3303](https://github.com/danielgindi/Charts/issues/3303)
+- HorizontalBarChart X axe labels duplicated [\#3300](https://github.com/danielgindi/Charts/issues/3300)
+- how can i change label color? [\#3298](https://github.com/danielgindi/Charts/issues/3298)
+- value granularity [\#3296](https://github.com/danielgindi/Charts/issues/3296)
+- Better way to manage Stacked Bar Chart Value labels? [\#3295](https://github.com/danielgindi/Charts/issues/3295)
+- Remove Y axis border line in Line Graph [\#3294](https://github.com/danielgindi/Charts/issues/3294)
+- XAxisRenderer not called [\#3293](https://github.com/danielgindi/Charts/issues/3293)
+- How to display string value on xAxis label in line chart [\#3292](https://github.com/danielgindi/Charts/issues/3292)
+- how to change the color of text that displayed below the chart ios swift 3 [\#3288](https://github.com/danielgindi/Charts/issues/3288)
+- color in BalloonMarker is never used [\#3287](https://github.com/danielgindi/Charts/issues/3287)
+- Question: LineChart variable line thickness? [\#3285](https://github.com/danielgindi/Charts/issues/3285)
+- Modify selected slice [\#3284](https://github.com/danielgindi/Charts/issues/3284)
+- Put shadow under slice [\#3283](https://github.com/danielgindi/Charts/issues/3283)
+- How can I take selected value index in Pie Chart [\#3282](https://github.com/danielgindi/Charts/issues/3282)
+- hide other label when one slice of pie chart was selected [\#3281](https://github.com/danielgindi/Charts/issues/3281)
+- How to show custom x and y axis details in LineChart in objective c ??? [\#3280](https://github.com/danielgindi/Charts/issues/3280)
+- I need to put dates from an array on xAxis [\#3277](https://github.com/danielgindi/Charts/issues/3277)
+- Is there a way to round the corners of the BalloonMarker? [\#3276](https://github.com/danielgindi/Charts/issues/3276)
+- Set values not showing until chart is zoomed [\#3275](https://github.com/danielgindi/Charts/issues/3275)
+- How to add gap between chart and legend? [\#3274](https://github.com/danielgindi/Charts/issues/3274)
- LineChart : How to show the grid in right axis [\#3271](https://github.com/danielgindi/Charts/issues/3271)
- How to custom axis' label in horizontal bar chart [\#3270](https://github.com/danielgindi/Charts/issues/3270)
- LineChart: How to fix space between point on xAxis [\#3269](https://github.com/danielgindi/Charts/issues/3269)
@@ -21,16 +65,20 @@
- is it support the ios 7??? [\#3263](https://github.com/danielgindi/Charts/issues/3263)
- Combined chart for candlestick + bar [\#3262](https://github.com/danielgindi/Charts/issues/3262)
- setScatterShape applied to Legend also [\#3261](https://github.com/danielgindi/Charts/issues/3261)
+- ChartDataSet min and max values not recalculated when calling clear\(\) [\#3260](https://github.com/danielgindi/Charts/issues/3260)
- How to realize the Line and the bar Chart in the same one Chart? [\#3259](https://github.com/danielgindi/Charts/issues/3259)
- '\_xBounds' and other variables inaccessible due to 'internal' protection level workaround [\#3258](https://github.com/danielgindi/Charts/issues/3258)
+- //view\_line\_graph.centerViewTo\(xValue: Double\(dataEntries\[pos\].x\) , yValue: Double\(dataEntries\[pos\].y\), axis: YAxis.AxisDependency.right\) [\#3257](https://github.com/danielgindi/Charts/issues/3257)
- dyld: Library not loaded: @rpath/Charts.framework/Charts [\#3250](https://github.com/danielgindi/Charts/issues/3250)
- X Axis disapeared [\#3249](https://github.com/danielgindi/Charts/issues/3249)
- Save zoom state [\#3248](https://github.com/danielgindi/Charts/issues/3248)
- leftAxis label bug? [\#3246](https://github.com/danielgindi/Charts/issues/3246)
- x-axis label jumps when zoomed in and side scrolling. [\#3245](https://github.com/danielgindi/Charts/issues/3245)
+- avoidFirstLastClippingEnabled not working and set last circleColor a different value [\#3244](https://github.com/danielgindi/Charts/issues/3244)
- Got totally 50 errors after install CocoaPods ..! I am using Swift 4.0 [\#3243](https://github.com/danielgindi/Charts/issues/3243)
- Error in Library When added pod file [\#3242](https://github.com/danielgindi/Charts/issues/3242)
- How to do multiple data on x axis? [\#3241](https://github.com/danielgindi/Charts/issues/3241)
+- Missing entries in PieChartDataEntry legends. [\#3240](https://github.com/danielgindi/Charts/issues/3240)
- Candle Stick does not show [\#3239](https://github.com/danielgindi/Charts/issues/3239)
- How i give LineChart Entry using x index and y value in Charts '3.0.4'? help wanted [\#3238](https://github.com/danielgindi/Charts/issues/3238)
- ChartDataEntry with icons shows scatter shape at same time [\#3237](https://github.com/danielgindi/Charts/issues/3237)
@@ -45,7 +93,6 @@
- Dash line and highlighted top value [\#3221](https://github.com/danielgindi/Charts/issues/3221)
- Why is the xAxis Value Formater so often called? [\#3220](https://github.com/danielgindi/Charts/issues/3220)
- How easy is to add some technical indicators? [\#3219](https://github.com/danielgindi/Charts/issues/3219)
-- BarChartView bug if set barWidth was 1.0? [\#3213](https://github.com/danielgindi/Charts/issues/3213)
- How to set X-Axis data to bottom of chart with strings data? [\#3212](https://github.com/danielgindi/Charts/issues/3212)
- how to drag the LineChartView [\#3211](https://github.com/danielgindi/Charts/issues/3211)
- Release 3.0.5 contains version number inconsistencies [\#3210](https://github.com/danielgindi/Charts/issues/3210)
@@ -64,6 +111,7 @@
- How to show/hide Stacked Bar Chart yValue? [\#3175](https://github.com/danielgindi/Charts/issues/3175)
- Readme needs to be updated for 3.0.5 [\#3170](https://github.com/danielgindi/Charts/issues/3170)
- Add Axis description to Charts Framework [\#3168](https://github.com/danielgindi/Charts/issues/3168)
+- ChartViewDelegate not called when barChart is out of screen [\#3165](https://github.com/danielgindi/Charts/issues/3165)
- dash line \(separators\) in between in bars. [\#3163](https://github.com/danielgindi/Charts/issues/3163)
- StackedBarChart Value on middle of each stacked bar chart [\#3162](https://github.com/danielgindi/Charts/issues/3162)
- ChartLimitLine Label Position [\#3161](https://github.com/danielgindi/Charts/issues/3161)
@@ -74,6 +122,7 @@
- How to make highlight scrolling on chart not trigger parent scrollView? \[help\] [\#3153](https://github.com/danielgindi/Charts/issues/3153)
- How to fill the color like the marked part of this following picture? Thanks a lot! [\#3144](https://github.com/danielgindi/Charts/issues/3144)
- finger leaves the chart area [\#3128](https://github.com/danielgindi/Charts/issues/3128)
+- Technical Support in Github [\#3126](https://github.com/danielgindi/Charts/issues/3126)
- Plotting the bar from top to bottom \(in reverse manner\) [\#3125](https://github.com/danielgindi/Charts/issues/3125)
- pieChart Data name overlap [\#3109](https://github.com/danielgindi/Charts/issues/3109)
- LineChart with different colors based on values. [\#3107](https://github.com/danielgindi/Charts/issues/3107)
@@ -88,6 +137,14 @@
**Merged pull requests:**
+- bump to 3.1 release [\#3357](https://github.com/danielgindi/Charts/pull/3357) ([liuxuan30](https://github.com/liuxuan30))
+- Refactors -\[tableView:cellForRowAtIndexPath:\] [\#3326](https://github.com/danielgindi/Charts/pull/3326) ([valeriyvan](https://github.com/valeriyvan))
+- minor bug fix in favor of 3.1 release [\#3312](https://github.com/danielgindi/Charts/pull/3312) ([liuxuan30](https://github.com/liuxuan30))
+- add pie chart unit tests [\#3297](https://github.com/danielgindi/Charts/pull/3297) ([liuxuan30](https://github.com/liuxuan30))
+- Align Objc and Swift demos balloon marker [\#3291](https://github.com/danielgindi/Charts/pull/3291) ([liuxuan30](https://github.com/liuxuan30))
+- for \#3146. add a warning message if pie chart has more than one data set [\#3286](https://github.com/danielgindi/Charts/pull/3286) ([liuxuan30](https://github.com/liuxuan30))
+- Issue templates [\#3278](https://github.com/danielgindi/Charts/pull/3278) ([jjatie](https://github.com/jjatie))
+- Min and Max reset when clearing ChartDataSet \(Fixes \#3260\) [\#3265](https://github.com/danielgindi/Charts/pull/3265) ([carlo-](https://github.com/carlo-))
- Restored old performance in ChartDataSet [\#3216](https://github.com/danielgindi/Charts/pull/3216) ([jjatie](https://github.com/jjatie))
- Support other bundle than main MarkerView.viewFromXib\(\) [\#3215](https://github.com/danielgindi/Charts/pull/3215) ([charlymr](https://github.com/charlymr))
- BubbleChart uses correct colour for index now. [\#3202](https://github.com/danielgindi/Charts/pull/3202) ([jjatie](https://github.com/jjatie))
diff --git a/Charts.podspec b/Charts.podspec
index e313d0b1c8..d21b95486b 100644
--- a/Charts.podspec
+++ b/Charts.podspec
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "Charts"
- s.version = "3.0.5"
+ s.version = "3.1.0"
s.summary = "Charts is a powerful & easy to use chart library for iOS, tvOS and OSX (and Android)"
s.homepage = "https://github.com/danielgindi/Charts"
s.license = { :type => "Apache License, Version 2.0", :file => "LICENSE" }
diff --git a/ChartsDemo-macOS/ChartsDemo-macOS.xcodeproj/project.pbxproj b/ChartsDemo-macOS/ChartsDemo-macOS.xcodeproj/project.pbxproj
index 2d45668a87..922588b12b 100644
--- a/ChartsDemo-macOS/ChartsDemo-macOS.xcodeproj/project.pbxproj
+++ b/ChartsDemo-macOS/ChartsDemo-macOS.xcodeproj/project.pbxproj
@@ -371,7 +371,7 @@
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = "";
- INFOPLIST_FILE = "ChartsDemo-OSX/Info.plist";
+ INFOPLIST_FILE = "$(SRCROOT)/ChartsDemo-macOS/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.dcg.ChartsDemo-OSX";
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -389,7 +389,7 @@
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = "";
- INFOPLIST_FILE = "ChartsDemo-OSX/Info.plist";
+ INFOPLIST_FILE = "$(SRCROOT)/ChartsDemo-macOS/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.dcg.ChartsDemo-OSX";
PRODUCT_NAME = "$(TARGET_NAME)";
diff --git a/README.md b/README.md
index 5be133ac9c..6100cfcbc4 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-**Version 3.0.5**, synced to [MPAndroidChart #f6a398b](https://github.com/PhilJay/MPAndroidChart/commit/f6a398b)
+**Version 3.1.0**, synced to [MPAndroidChart #f6a398b](https://github.com/PhilJay/MPAndroidChart/commit/f6a398b)

 [](https://github.com/danielgindi/Charts/releases) [](http://cocoapods.org/pods/charts) [](https://github.com/Carthage/Carthage) [](https://travis-ci.org/danielgindi/Charts) [](https://codecov.io/gh/danielgindi/Charts)
@@ -7,7 +7,7 @@
### Just a heads up: Charts 3.0 has some breaking changes. Please read [the release/migration notes](https://github.com/danielgindi/Charts/releases/tag/v3.0.0).
### Another heads up: ChartsRealm is now in a [separate repo](https://github.com/danielgindi/ChartsRealm). Pods is also now `Charts` and `ChartsRealm`, instead of ~`Charts/Core`~ and ~`Charts/Realm`~
-* Xcode 9.2 / Swift 4.0.2
+* Xcode 9.2 / Swift 4.0.3
* iOS >= 8.0 (Use as an **Embedded** Framework)
* tvOS >= 9.0
* macOS >= 10.11
@@ -78,8 +78,8 @@ For [Realm](https://realm.io/) support, please add `pod 'ChartsRealm'` too.
Charts now include Carthage prebuilt binaries.
```carthage
-github "danielgindi/Charts" == 3.0.5
-github "danielgindi/Charts" ~> 3.0.5
+github "danielgindi/Charts" == 3.1.0
+github "danielgindi/Charts" ~> 3.1.0
```
In order to build the binaries for a new release, use `carthage build --no-skip-current && carthage archive Charts`.
diff --git a/Rakefile b/Rakefile
index 3a8868f3c5..016faddc9f 100644
--- a/Rakefile
+++ b/Rakefile
@@ -66,8 +66,8 @@ def devices
},
tvOS: {
sdk: 'appletvsimulator',
- device: "name='Apple TV 1080p'",
- name: 'Apple TV 1080p'
+ device: "name='Apple TV'",
+ name: 'Apple TV'
}
}
end
@@ -179,4 +179,4 @@ end
desc 'generate changelog'
task :generate_changelog do
sh 'github_changelog_generator'
-end
+end
\ No newline at end of file
diff --git a/Source/Charts/Charts/BarLineChartViewBase.swift b/Source/Charts/Charts/BarLineChartViewBase.swift
index 412c23b8b5..6b06ec6c5e 100644
--- a/Source/Charts/Charts/BarLineChartViewBase.swift
+++ b/Source/Charts/Charts/BarLineChartViewBase.swift
@@ -50,6 +50,11 @@ open class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChartD
/// When enabled, the values will be clipped to contentRect, otherwise they can bleed outside the content rect.
@objc open var clipValuesToContentEnabled: Bool = false
+ /// When disabled, the data and/or highlights will not be clipped to contentRect. Disabling this option can
+ /// be useful, when the data lies fully within the content rect, but is drawn in such a way (such as thick lines)
+ /// that there is unwanted clipping.
+ @objc open var clipDataToContentEnabled: Bool = true
+
/// Sets the minimum offset (padding) around the chart, defaults to 10
@objc open var minOffset = CGFloat(10.0)
@@ -218,9 +223,13 @@ open class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChartD
rightYAxisRenderer.renderLimitLines(context: context)
}
- // make sure the data cannot be drawn outside the content-rect
context.saveGState()
- context.clip(to: viewPortHandler.contentRect)
+
+ // make sure the data cannot be drawn outside the content-rect
+ if clipDataToContentEnabled {
+ context.clip(to: viewPortHandler.contentRect)
+ }
+
renderer.drawData(context: context)
// if highlighting is enabled
@@ -1681,12 +1690,12 @@ open class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChartD
}
/// - returns: The DataSet object displayed at the touched position of the chart
- @objc open func getDataSetByTouchPoint(point pt: CGPoint) -> BarLineScatterCandleBubbleChartDataSetProtocol!
+ @objc open func getDataSetByTouchPoint(point pt: CGPoint) -> BarLineScatterCandleBubbleChartDataSetProtocol?
{
let h = getHighlightByTouchPoint(pt)
- if h !== nil
+ if let h = h
{
- return data?.getDataSetByIndex(h!.dataSetIndex) as! BarLineScatterCandleBubbleChartDataSetProtocol
+ return data?.getDataSetByIndex(h.dataSetIndex) as? BarLineScatterCandleBubbleChartDataSetProtocol
}
return nil
}
diff --git a/Source/Charts/Components/Legend.swift b/Source/Charts/Components/Legend.swift
index e51c0a3616..d246946427 100644
--- a/Source/Charts/Components/Legend.swift
+++ b/Source/Charts/Components/Legend.swift
@@ -256,7 +256,7 @@ open class Legend: ComponentBase
if let label = e.label
{
let size = (label as NSString).size(withAttributes: [.font: labelFont])
-
+
if drawingForm && !wasStacked
{
width += formToTextSpace
diff --git a/Source/Charts/Data/Implementations/Standard/PieChartData.swift b/Source/Charts/Data/Implementations/Standard/PieChartData.swift
index 5ee2f4347e..775474327d 100644
--- a/Source/Charts/Data/Implementations/Standard/PieChartData.swift
+++ b/Source/Charts/Data/Implementations/Standard/PieChartData.swift
@@ -28,17 +28,17 @@ open class PieChartData: ChartData
super.init(dataSets: elements)
}
- @objc var dataSet: PieChartDataSetProtocol?
+ @objc public var dataSet: PieChartDataSetProtocol?
{
get
{
- return dataSets.count > 0 ? dataSets[0] as? PieChartDataSetProtocol : nil
+ return dataSets.first as? PieChartDataSetProtocol
}
set
{
- if let newValue = newValue
+ if let set = newValue
{
- dataSets = [newValue]
+ dataSets = [set]
}
else
{
@@ -46,6 +46,20 @@ open class PieChartData: ChartData
}
}
}
+
+ /// - returns: All up to one dataSet object this ChartData object holds.
+ @objc open override var dataSets: [ChartDataSetProtocol]
+ {
+ get
+ {
+ assert(super.dataSets.count <= 1, "Found multiple data sets while pie chart only allows one")
+ return super.dataSets
+ }
+ set
+ {
+ super.dataSets = newValue
+ }
+ }
open override func getDataSetByIndex(_ index: Int) -> ChartDataSetProtocol?
{
diff --git a/Source/Charts/Data/Interfaces/LineRadarChartDataSetProtocol.swift b/Source/Charts/Data/Interfaces/LineRadarChartDataSetProtocol.swift
index e9f3297562..71fa74b8b8 100644
--- a/Source/Charts/Data/Interfaces/LineRadarChartDataSetProtocol.swift
+++ b/Source/Charts/Data/Interfaces/LineRadarChartDataSetProtocol.swift
@@ -40,6 +40,6 @@ public protocol LineRadarChartDataSetProtocol: LineScatterCandleRadarChartDataSe
/// Please note that this method uses the path clipping for drawing the filled area (with images, gradients and layers).
var drawFilledEnabled: Bool { get set }
- /// - returns: `true` if filled drawing is enabled, `false` ifnot
+ /// - returns: `true` if filled drawing is enabled, `false` if not
var isDrawFilledEnabled: Bool { get }
}
diff --git a/Source/Supporting Files/Info.plist b/Source/Supporting Files/Info.plist
index 479df9665c..6bdf744f80 100644
--- a/Source/Supporting Files/Info.plist
+++ b/Source/Supporting Files/Info.plist
@@ -15,11 +15,11 @@
CFBundlePackageType
FMWK
CFBundleShortVersionString
- 3.0.5
+ 3.1.0
CFBundleSignature
????
CFBundleVersion
- 24
+ 1
NSPrincipalClass