Skip to content

Commit 043409c

Browse files
committed
Format code
1 parent 8043c80 commit 043409c

File tree

1 file changed

+63
-69
lines changed

1 file changed

+63
-69
lines changed

AAInfographicsDemo/Demo/MixedChartVC.swift

Lines changed: 63 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class MixedChartVC: AABaseChartVC {
3737
super.viewDidLoad()
3838

3939
}
40-
40+
4141
override func chartConfigurationWithSelectedChartTypeString(_ selectedChartTypeStr: String) -> Any? {
4242
switch selectedChartTypeStr {
4343
case "arearangeMixedLine":return configureArearangeMixedLineChart()
@@ -99,15 +99,13 @@ class MixedChartVC: AABaseChartVC {
9999
[12488256, 14.4],
100100
[12489120, 15],
101101
[12489984, 13.6]
102-
])
102+
])
103103
.zIndex(1)
104-
.marker(
105-
AAMarker()
106-
.radius(5)
107-
.fillColor("#1E90FF")
108-
.lineWidth(2.0)
109-
)
110-
,
104+
.marker(AAMarker()
105+
.radius(5)
106+
.fillColor("#1E90FF")
107+
.lineWidth(2.0))
108+
,
111109
AASeriesElement()
112110
.name("Range")
113111
.color("#1E90FF")
@@ -146,10 +144,10 @@ class MixedChartVC: AABaseChartVC {
146144
[12488256, 10.8, 17.8],
147145
[12489120, 11.8, 18.5],
148146
[12489984, 10.8, 16.1]
149-
])
147+
])
150148
.zIndex(0)
151-
,
152-
])
149+
,
150+
])
153151
}
154152

155153
private func configureColumnrangeMixedLineChart() -> AAChartModel {
@@ -175,25 +173,25 @@ class MixedChartVC: AABaseChartVC {
175173
[(-3.1),11.4],
176174
[(-5.2),10.4],
177175
[(-9.9),16.8]
178-
])
179-
,
176+
])
177+
,
180178
AASeriesElement()
181179
.name("Tokyo")
182180
.data([7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6])
183-
,
181+
,
184182
AASeriesElement()
185183
.name("New York")
186184
.data([0.2, 0.8, 5.7, 11.3, 17.0, 22.0, 24.8, 24.1, 20.1, 14.1, 8.6, 2.5])
187-
,
185+
,
188186
AASeriesElement()
189187
.name("Berlin")
190188
.data([0.9, 0.6, 3.5, 8.4, 13.5, 17.0, 18.6, 17.9, 14.3, 9.0, 3.9, 1.0])
191-
,
189+
,
192190
AASeriesElement()
193191
.name("London")
194192
.data([3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8])
195-
,
196-
])
193+
,
194+
])
197195
}
198196

199197
private func configureStackingColumnMixedLineChart() -> AAChartModel {
@@ -218,9 +216,8 @@ class MixedChartVC: AABaseChartVC {
218216
.color(AAColor.red)
219217
.fontSize(11)
220218
)
221-
)
222-
,
223-
219+
)
220+
,
224221
AASeriesElement()
225222
.name("老用户")
226223
.data([198.66, 330.81, 151.95, 160.12, 222.56, 229.05, 128.53, 250.91, 224.47, 473.99, 126.85, 260.50])
@@ -230,9 +227,8 @@ class MixedChartVC: AABaseChartVC {
230227
.color(AAColor.green)
231228
.fontSize(11)
232229
)
233-
)
234-
,
235-
230+
)
231+
,
236232
AASeriesElement()
237233
.name("总量")
238234
.type(.line)
@@ -243,9 +239,9 @@ class MixedChartVC: AABaseChartVC {
243239
.color(AAColor.blue)
244240
.fontSize(15)
245241
)
246-
)
247-
,
248-
])
242+
)
243+
,
244+
])
249245
}
250246

251247
private func configureDashStyleTypesMixedChart() -> AAChartModel {
@@ -259,32 +255,32 @@ class MixedChartVC: AABaseChartVC {
259255
.name("Solid")
260256
.lineWidth(3)
261257
.data([50, 320, 230, 370, 230, 400,])
262-
,
258+
,
263259
AASeriesElement()
264260
.name("Dash")
265261
.lineWidth(3)
266262
.dashStyle(.dash)
267263
.data([50, 320, 230, 370, 230, 400,])
268-
,
264+
,
269265
AASeriesElement()
270266
.name("DashDot")
271267
.lineWidth(3)
272268
.dashStyle(.dashDot)
273269
.data([50, 320, 230, 370, 230, 400,])
274-
,
270+
,
275271
AASeriesElement()
276272
.name("LongDash")
277273
.lineWidth(3)
278274
.dashStyle(.longDash)
279275
.data([50, 320, 230, 370, 230, 400,])
280-
,
276+
,
281277
AASeriesElement()
282278
.name("LongDashDot")
283279
.lineWidth(3)
284280
.dashStyle(.longDashDot)
285281
.data([50, 320, 230, 370, 230, 400,])
286-
,
287-
])
282+
,
283+
])
288284
}
289285

290286
private func configureNegativeColorMixedChart() -> AAChartModel {
@@ -300,8 +296,8 @@ class MixedChartVC: AABaseChartVC {
300296
.color("#0088FF")
301297
.negativeColor("#FF0000")
302298
.threshold(4)//default:0
303-
,
304-
])
299+
,
300+
])
305301
}
306302

307303
private func configureScatterMixedLineChart() -> AAChartModel {
@@ -515,15 +511,18 @@ class MixedChartVC: AABaseChartVC {
515511
[0.070095, 3.213817],
516512
[0.52707, 3.952681],
517513
[0.116163, 3.129283]
518-
])
514+
])
519515
.color("#0088FF")
520-
,
516+
,
521517
AASeriesElement()
522518
.type(.line)
523519
.name("线性回归线")
524-
.data([[0.014, 3.078], [0.969, 4.655]])
520+
.data([
521+
[0.014, 3.078],
522+
[0.969, 4.655]
523+
])
525524
.color("#FF0000")
526-
])
525+
])
527526
}
528527

529528
private func configureNegativeColorMixedBubbleChart() -> AAChartModel {
@@ -553,12 +552,12 @@ class MixedChartVC: AABaseChartVC {
553552
[6,3,0],[6,4,0],[6,5,0],[6,6,0],[6,7,0],[6,8,0],[6,9,0],[6,10,1],[6,11,0],[6,12,2],
554553
[6,13,1],[6,14,3],[6,15,4],[6,16,0],[6,17,0],[6,18,0],[6,19,0],[6,20,1],[6,21,2],
555554
[6,22,2],[6,23,6]
556-
])
555+
])
557556
.color("#0088FF")
558557
.negativeColor("#FF0000")
559558
.threshold(4)//default:0
560-
,
561-
])
559+
,
560+
])
562561
}
563562

564563
private func configurePolygonMixedScatterChart() -> AAChartModel {
@@ -570,7 +569,7 @@ class MixedChartVC: AABaseChartVC {
570569
.data([[153, 42], [149, 46], [149, 55], [152, 60], [159, 70], [170, 77], [180, 70],
571570
[180, 60], [173, 52], [166, 45]])
572571
.color("rgba(119, 152, 191, 0.5)")
573-
,
572+
,
574573
AASeriesElement()
575574
.name("实际值")
576575
.type(.scatter)
@@ -627,10 +626,10 @@ class MixedChartVC: AABaseChartVC {
627626
[156.2, 60.0], [149.9, 46.8], [169.5, 57.3], [160.0, 64.1], [175.3, 63.6],
628627
[169.5, 67.3], [160.0, 75.5], [172.7, 68.2], [162.6, 61.4], [157.5, 76.8],
629628
[176.5, 71.8], [164.4, 55.5], [160.7, 48.6], [174.0, 66.4], [163.8, 67.3]
630-
])
629+
])
631630
.color("#ff0000")
632-
,
633-
])
631+
,
632+
])
634633
}
635634

636635
private func configurePolarChartMixedChart() -> AAChartModel {
@@ -642,18 +641,18 @@ class MixedChartVC: AABaseChartVC {
642641
.name("Column")
643642
.type(.column)
644643
.data([8, 7, 6, 5, 4, 3, 2, 1])
645-
,
644+
,
646645
AASeriesElement()
647646
.name("Line")
648647
.type(.line)
649648
.data([1, 2, 3, 4, 5, 6, 7, 8])
650-
,
649+
,
651650
AASeriesElement()
652651
.name("Area")
653652
.type(.area)
654653
.data([1, 8, 2, 7, 3, 6, 4, 5])
655-
,
656-
])
654+
,
655+
])
657656
}
658657

659658
private func configureColumnMixedScatterChart() -> AAChartModel {
@@ -672,7 +671,7 @@ class MixedChartVC: AABaseChartVC {
672671
3,NSNull(),NSNull(),NSNull(),NSNull(),NSNull(),NSNull(),NSNull(),NSNull(),NSNull(),NSNull(),NSNull(),NSNull(),
673672
2,NSNull(),NSNull(),NSNull(),NSNull(),NSNull(),NSNull(),NSNull(),NSNull(),NSNull(),NSNull(),NSNull(),NSNull(),
674673
1])
675-
,
674+
,
676675
AASeriesElement()
677676
.name("Scatter")
678677
.type(.scatter)
@@ -683,15 +682,13 @@ class MixedChartVC: AABaseChartVC {
683682
2.9, 2.5, 2.8, 3.3, 2.7, 3, 2.9, 3, 3, 2.5, 2.9, 2.5, 3.6, 3.2, 2.7, 3, 2.5, 2.8, 3.2, 3, 3.8, 2.6, 2.2, 3.2, 2.8,
684683
2.8, 2.7, 3.3, 3.2, 2.8, 3, 2.8, 3, 2.8, 3.8, 2.8, 2.8, 2.6, 3, 3.4, 3.1, 3, 3.1, 3.1, 3.1, 2.7, 3.2, 3.3, 3, 2.5,
685684
3, 3.4, 3])
686-
.marker(
687-
AAMarker()
688-
.radius(5)
689-
.symbol("circle")
690-
.fillColor("#1E90FF")
691-
.lineWidth(2.0)
692-
.lineColor(AAColor.red)
693-
)
694-
])
685+
.marker(AAMarker()
686+
.radius(5)
687+
.symbol("circle")
688+
.fillColor("#1E90FF")
689+
.lineWidth(2.0)
690+
.lineColor(AAColor.red))
691+
])
695692
}
696693

697694
private func configurePieMixedLineMixedColumnChart() -> AAChartModel {
@@ -714,12 +711,10 @@ class MixedChartVC: AABaseChartVC {
714711
.name("average value")
715712
.type(.line)
716713
.data([3, 2.67, 3, 6.33, 3.33])
717-
.marker(
718-
AAMarker()
719-
.fillColor("#1E90FF")
720-
.lineWidth(2.0)
721-
.lineColor(AAColor.white)
722-
)
714+
.marker(AAMarker()
715+
.fillColor("#1E90FF")
716+
.lineWidth(2.0)
717+
.lineColor(AAColor.white))
723718

724719
let pieElement = AAPie()
725720
.type(.pie)
@@ -836,6 +831,5 @@ class MixedChartVC: AABaseChartVC {
836831
,
837832
])
838833
}
839-
840-
834+
841835
}

0 commit comments

Comments
 (0)