Skip to content

Commit fca968b

Browse files
committed
Add deprecated mark for AAChart
1 parent 2ea833b commit fca968b

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

AAInfographics/AAChartCreator/AAOptions.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,10 @@ public class AAOptionsConstructor {
159159
.type(aaChartModel.chartType)
160160
.inverted(aaChartModel.inverted)
161161
.backgroundColor(aaChartModel.backgroundColor)
162-
.pinchType(aaChartModel.zoomType) //Set gesture zoom direction
162+
// .zoomType(aaChartModel.zoomType)
163+
.zooming(AAZooming()
164+
.type(aaChartModel.zoomType))
165+
// .pinchType(aaChartModel.zoomType) //Set gesture zoom direction
163166
// .panning(true) //Set whether gestures can be panned after zooming
164167
.polar(aaChartModel.polar) //Whether to polarize the chart (turn on polar mode)
165168
.scrollablePlotArea(aaChartModel.scrollablePlotArea)

AAInfographics/AAOptionsModel/AAChart.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ public class AAChart: AAObject {
3737
public var backgroundColor: Any?
3838
public var plotBackgroundColor: Any?
3939
public var plotBackgroundImage: String?
40+
//为 pinchType 属性添加废弃标记. 请使用 `zooming` 属性的 `pinchType` 属性代替
41+
@available(*, deprecated, message: "This property has been deprecated, please use the `pinchType` property of `zooming` property of `AAChart` instead")
4042
public var pinchType: String?
4143
public var panning: AAPanning?
4244
public var panKey: String?
@@ -55,6 +57,8 @@ public class AAChart: AAObject {
5557
public var spacingLeft: Float? //👈
5658
public var scrollablePlotArea: AAScrollablePlotArea?
5759
public var resetZoomButton: AAResetZoomButton?
60+
//为 zoomtype 属性添加废弃标记. 请使用 `zooming` 属性的 `type` 属性代替
61+
@available(*, deprecated, message: "This property has been deprecated, please use the `type` property of `zooming` property of `AAChart` instead")
5862
public var zoomType: String?
5963
public var zooming: AAZooming?
6064
public var events: AAChartEvents?
@@ -90,6 +94,8 @@ public class AAChart: AAObject {
9094
return self
9195
}
9296

97+
//为 pinchType 属性添加废弃标记. 请使用 `zooming` 属性的 `pinchType` 属性代替
98+
@available(*, deprecated, message: "This property has been deprecated, please use the `pinchType` property of `zooming` set method of `AAChart` instead")
9399
@discardableResult
94100
public func pinchType(_ prop: AAChartZoomType?) -> AAChart {
95101
pinchType = prop?.rawValue
@@ -224,6 +230,8 @@ public class AAChart: AAObject {
224230
return self
225231
}
226232

233+
//为 zoomType 属性添加废弃标记. 请使用 `zooming` 属性的 `type` 属性代替
234+
@available(*, deprecated, message: "This method has been deprecated, please use the `type` property of `zooming` set method of `AAChart` instead")
227235
@discardableResult
228236
public func zoomType(_ prop: AAChartZoomType?) -> AAChart {
229237
zoomType = prop?.rawValue

0 commit comments

Comments
 (0)