Skip to content

Commit b51e53c

Browse files
authored
Merge pull request #541 from AAChartModel/dev
Dev
2 parents 42871c9 + e984f06 commit b51e53c

File tree

7 files changed

+282
-136
lines changed

7 files changed

+282
-136
lines changed

AAInfographics.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'AAInfographics'
3-
s.version = '9.4.0'
3+
s.version = '9.5.0'
44
s.summary = '📈📊📱📺💻An elegant modern declarative data visualization chart framework for iOS, iPadOS and macOS. Extremely powerful, supports line, spline, area, areaspline, column, bar, pie, scatter, angular gauges, arearange, areasplinerange, columnrange, bubble, box plot, error bars, funnel, waterfall and polar chart types. 极其精美而又强大的跨平台数据可视化图表框架,支持柱状图、条形图、折线图、曲线图、折线填充图、曲线填充图、气泡图、扇形图、环形图、散点图、雷达图、混合图等各种类型的多达几十种的信息图图表,完全满足工作所需.'
55
s.homepage = 'https://github.com/AAChartModel/AAChartKit-Swift'
66
s.license = 'MIT'

AAInfographics/AAOptionsModel/AABoxplot.swift

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,10 @@ public class AABoxplot: AAObject {
4646
public var stemWidth: Float?
4747
public var whiskerColor: String?
4848
public var whiskerDashStyle: String?
49-
public var whiskerLength: String?
49+
public var whiskerLength: Any?
5050
public var whiskerWidth: Float?
51+
public var pointPadding: Float?
52+
public var pointWidth: Float?
5153

5254
@discardableResult
5355
public func boxDashStyle(_ prop: AAChartLineDashStyleType?) -> AABoxplot {
@@ -132,14 +134,33 @@ public class AABoxplot: AAObject {
132134
whiskerLength = prop
133135
return self
134136
}
137+
138+
@discardableResult
139+
public func whiskerLength(_ prop: Float?) -> AABoxplot {
140+
whiskerLength = prop
141+
return self
142+
}
135143

136144
@discardableResult
137145
public func whiskerWidth(_ prop: Float?) -> AABoxplot {
138146
whiskerWidth = prop
139147
return self
140148
}
141149

150+
@discardableResult
151+
public func pointPadding(_ prop: Float?) -> AABoxplot {
152+
pointPadding = prop
153+
return self
154+
}
155+
156+
@discardableResult
157+
public func pointWidth(_ prop: Float?) -> AABoxplot {
158+
pointWidth = prop
159+
return self
160+
}
161+
142162
public override init() {
143163

144164
}
165+
145166
}

AAInfographicsDemo.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
84123BC92DB0F0EB003DA7A0 /* AAPackedbubble.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84123BC82DB0F0EB003DA7A0 /* AAPackedbubble.swift */; };
6262
84123BCB2DB0F130003DA7A0 /* AALayoutAlgorithm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84123BCA2DB0F130003DA7A0 /* AALayoutAlgorithm.swift */; };
6363
8418479928B8755900094106 /* JSFunctionForAAChartEventsComposer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8418479828B8755900094106 /* JSFunctionForAAChartEventsComposer.swift */; };
64+
842EB1B82DF16ECF000166C2 /* AAMixedChartComposer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 842EB1B72DF16ECF000166C2 /* AAMixedChartComposer.swift */; };
6465
842FC3EE2CBE119500FBAD3A /* CustomTooltipEventCallbackVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 842FC3ED2CBE119500FBAD3A /* CustomTooltipEventCallbackVC.swift */; };
6566
84339F4F2D536AC900F54F1E /* SortAlgorithmVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84339F4E2D536AC900F54F1E /* SortAlgorithmVC.swift */; };
6667
84339F572D54591900F54F1E /* ChartSampleProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84339F562D54591900F54F1E /* ChartSampleProvider.swift */; };
@@ -313,6 +314,7 @@
313314
84123BC82DB0F0EB003DA7A0 /* AAPackedbubble.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AAPackedbubble.swift; sourceTree = "<group>"; };
314315
84123BCA2DB0F130003DA7A0 /* AALayoutAlgorithm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AALayoutAlgorithm.swift; sourceTree = "<group>"; };
315316
8418479828B8755900094106 /* JSFunctionForAAChartEventsComposer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSFunctionForAAChartEventsComposer.swift; sourceTree = "<group>"; };
317+
842EB1B72DF16ECF000166C2 /* AAMixedChartComposer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AAMixedChartComposer.swift; sourceTree = "<group>"; };
316318
842FC3ED2CBE119500FBAD3A /* CustomTooltipEventCallbackVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomTooltipEventCallbackVC.swift; sourceTree = "<group>"; };
317319
84339F4E2D536AC900F54F1E /* SortAlgorithmVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SortAlgorithmVC.swift; sourceTree = "<group>"; };
318320
84339F562D54591900F54F1E /* ChartSampleProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChartSampleProvider.swift; sourceTree = "<group>"; };
@@ -660,6 +662,7 @@
660662
84086B1928E45015006BD30D /* AAOptionsWithJS */ = {
661663
isa = PBXGroup;
662664
children = (
665+
842EB1B72DF16ECF000166C2 /* AAMixedChartComposer.swift */,
663666
44EB70A622BCB606008FECE4 /* JSFunctionForAATooltipVC.swift */,
664667
84DEB89F28F7A58900BF9423 /* JSFunctionForAATooltipVC2.swift */,
665668
84086B1A28E45127006BD30D /* JSFunctionForAAAxisVC.swift */,
@@ -1092,6 +1095,7 @@
10921095
84086B1E28E6C612006BD30D /* CustomTableViewCell.swift in Sources */,
10931096
8441C0972C620ED400A6F784 /* CustomStyleForAreasplineChartComposer.swift in Sources */,
10941097
844007742B6F3FA00072FB66 /* MixedChartVC.swift in Sources */,
1098+
842EB1B82DF16ECF000166C2 /* AAMixedChartComposer.swift in Sources */,
10951099
8441C0952C620AC900A6F784 /* CustomStyleForSplineChartVC.swift in Sources */,
10961100
84903CA02DBA24B50029FE5A /* EmojiProvider.swift in Sources */,
10971101
845BABF12D030318004C15D4 /* OfficialChartSample.swift in Sources */,

AAInfographicsDemo/Demo/AAChartModel/Composer/ChartSampleProvider.swift

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ class ChartSampleProvider: NSObject {
122122
//遍历 originalItems 数组,将其中的每个 AAChartModel 实例转化为 AAOptions 实例
123123
let finalItems = originalItems.map { (aaChartModel) -> AAOptions in
124124
let aaOptions = aaChartModel.aa_toAAOptions()
125+
// aaOptions.chart?.polar(true)
125126
return aaOptions
126127
}
127128

@@ -130,7 +131,7 @@ class ChartSampleProvider: NSObject {
130131

131132

132133
static func aaOptionsItems() -> [AAOptions] {
133-
return [
134+
let originalItems = [
134135
XAxisYAxisTypeOptionsComposer.datatimeTypeLineAndColumnMixedChart(),
135136
MixedTypesChartOptionsComposer.columnrangeAndScatterMixedTypesChart(),
136137
MixedTypesChartOptionsComposer.invertedColumnrangeAndScatterMixedTypesChart(),
@@ -249,11 +250,20 @@ class ChartSampleProvider: NSObject {
249250
DrawChartWithAAOptionsVC.configurePieChartWithSpecialStyleLegend(),//自定义饼图的 legend 为特殊样式
250251
DrawChartWithAAOptionsVC.disableAnimationForChart(), //禁用图表渲染动画
251252
]
253+
254+
//遍历 originalItems 数组,将其中的每个 AAChartModel 实例转化为 AAOptions 实例
255+
let finalItems = originalItems.map { (aaOptions) -> AAOptions in
256+
let aaOptions = aaOptions
257+
// aaOptions.chart?.polar(true)
258+
return aaOptions
259+
}
260+
261+
return finalItems
252262
}
253263

254264

255265
static func officalChartSampleItems() -> [AAOptions] {
256-
return [
266+
let originalItems = [
257267
AreaChartOptionsComposer.basicAreaChart(),//基础面积图
258268
AreaChartOptionsComposer.areaWithNegativeValuesChart(),//带有负值的面积图
259269
AreaChartOptionsComposer.stackedAreaChart(),//堆积面积图
@@ -283,6 +293,15 @@ class ChartSampleProvider: NSObject {
283293
PieChartOptionsComposer.basicPieChartWithMonochromeColor(),//带有单色的基本饼状图
284294
PieChartOptionsComposer.customPieChartTitlePosition(),//自定义饼状图标题位置
285295
]
296+
297+
//遍历 originalItems 数组,将其中的每个 AAChartModel 实例转化为 AAOptions 实例
298+
let finalItems = originalItems.map { (aaOptions) -> AAOptions in
299+
let aaOptions = aaOptions
300+
// aaOptions.chart?.polar(true)
301+
return aaOptions
302+
}
303+
304+
return finalItems
286305
}
287306

288307

AAInfographicsDemo/Demo/AAOptions/DrawChartWithAAOptionsVC.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class DrawChartWithAAOptionsVC: AABaseChartVC {
4242

4343
override func chartConfigurationWithSelectedIndex(_ selectedIndex: Int) -> Any? {
4444
switch selectedIndex {
45-
case 0: return DrawChartWithAAOptionsVC.configureLegendStyle()
45+
case 0: return AAMixedChartComposer.barMixedColumnrangeWithPatternFillChart()
4646
case 1: return DrawChartWithAAOptionsVC.simpleGaugeChart()
4747
case 2: return DrawChartWithAAOptionsVC.gaugeChartWithPlotBand()
4848
case 3: return DrawChartWithAAOptionsVC.configureChartWithBackgroundImage()

AAInfographicsDemo/Demo/AAOptions/EmojiParticleAnimationVC.swift

Lines changed: 1 addition & 131 deletions
Original file line numberDiff line numberDiff line change
@@ -466,137 +466,7 @@ class EmojiParticleAnimationVC: UIViewController {
466466
private var currentMarkerRadius: CGFloat = 6
467467
private var currentMarkerSymbol: AAChartSymbolType = .circle
468468

469-
private let defaultEmojis = [
470-
"🍎",
471-
"🍐",
472-
"🍊",
473-
"🍋",
474-
"🍋‍🟩",
475-
"🍌",
476-
"🍉",
477-
"🍇",
478-
"🍓",
479-
"🫐",
480-
"🍈",
481-
"🍒",
482-
"🍑",
483-
"🥭",
484-
"🍍",
485-
"🥥",
486-
"🥝",
487-
"🍅",
488-
"🍆",
489-
"🥑",
490-
"🥦",
491-
"🫛",
492-
"🥬",
493-
"🫜",
494-
"🥒",
495-
"🌶",
496-
"🫑",
497-
"🌽",
498-
"🥕",
499-
"🫒",
500-
"🧄",
501-
"🧅",
502-
"🫚",
503-
"🥔",
504-
"🍠",
505-
"🫘",
506-
"🥐",
507-
"🥯",
508-
"🍞",
509-
"🥖",
510-
"🥨",
511-
"🧀",
512-
"🥚",
513-
"🍳",
514-
"🧈",
515-
"🥞",
516-
"🧇",
517-
"🥓",
518-
"🥩",
519-
"🍗",
520-
"🍖",
521-
"🦴",
522-
"🌭",
523-
"🍔",
524-
"🍟",
525-
"🍕",
526-
"🫓",
527-
"🥪",
528-
"🥙",
529-
"🧆",
530-
"🌮",
531-
"🌯",
532-
"🫔",
533-
"🥗",
534-
"🥘",
535-
"🫕",
536-
"🥫",
537-
"🍝",
538-
"🍜",
539-
"🍲",
540-
"🍛",
541-
"🍣",
542-
"🍱",
543-
"🥟",
544-
"🦪",
545-
"🍤",
546-
"🍙",
547-
"🍚",
548-
"🍘",
549-
"🍥",
550-
"🥠",
551-
"🥮",
552-
"🍢",
553-
"🍡",
554-
"🍧",
555-
"🍨",
556-
"🍦",
557-
"🥧",
558-
"🧁",
559-
"🍰",
560-
"🎂",
561-
"🍮",
562-
"🍭",
563-
"🍬",
564-
"🍫",
565-
"🍿",
566-
"🍩",
567-
"🍪",
568-
"🌰",
569-
"🥜",
570-
"🍯",
571-
"🥛",
572-
"🍼",
573-
"🫖",
574-
"☕️",
575-
"🍵",
576-
"🧃",
577-
"🥤",
578-
"🧋",
579-
"🫙",
580-
"🍶",
581-
"🍺",
582-
"🍻",
583-
"🥂",
584-
"🍷",
585-
"🫗",
586-
"🥃",
587-
"🍸",
588-
"🍹",
589-
"🧉",
590-
"🍾",
591-
"🧊",
592-
"🥄",
593-
"🍴",
594-
"🍽",
595-
"🥣",
596-
"🥡",
597-
"🥢",
598-
"🧂",
599-
]
469+
private let defaultEmojis = EmojiProvider.clothingAndAccessories() + EmojiProvider.foodAndDrink()
600470

601471

602472
override func viewDidLoad() {

0 commit comments

Comments
 (0)