3232import UIKit
3333
3434class DrawChartWithAAOptionsVC : AABaseChartVC {
35-
35+
3636 override func viewDidLoad( ) {
3737 super. viewDidLoad ( )
38-
38+
3939 }
4040
4141 override func chartConfigurationWithSelectedIndex( _ selectedIndex: Int ) -> Any ? {
@@ -73,7 +73,6 @@ class DrawChartWithAAOptionsVC: AABaseChartVC {
7373 case 30 : return configureSpiderWebRadarChart ( ) //带有颜色标志带の🕸蜘蛛网状雷达图
7474 case 31 : return disableMixedChartInactiveAnimationEffect ( ) //禁用混合图表的 inactive 动画效果
7575 case 32 : return adjustBubbleChartMinAndMax ( ) //调整气泡图的 min 和 max 相关属性
76-
7776
7877 default :
7978 return AAOptions ( )
@@ -115,7 +114,7 @@ class DrawChartWithAAOptionsVC: AABaseChartVC {
115114 ] )
116115 let aaOptions = AAOptionsConstructor . configureChartOptions ( aaChartModel)
117116 aaOptions. yAxis? . labels? . format = " {value} $ " ;//给y轴添加单位
118-
117+
119118 aaOptions. legend!
120119 . itemMarginTop ( 20 )
121120 . symbolRadius ( 10 ) //图标圆角
@@ -175,7 +174,7 @@ class DrawChartWithAAOptionsVC: AABaseChartVC {
175174 return aaOptions
176175 }
177176
178- private func yAxisOnTheRightSideChart( ) -> AAOptions {
177+ private func yAxisOnTheRightSideChart( ) -> AAOptions {
179178 let aaChartModel = AAChartModel ( )
180179 . chartType ( . line) //图表类型
181180 . title ( " yAxis on the right side 📈 " ) //图表主标题
@@ -201,7 +200,7 @@ class DrawChartWithAAOptionsVC: AABaseChartVC {
201200 return aaOptions
202201 }
203202
204- private func adjustYAxisMinValueForChart( ) -> AAOptions {
203+ private func adjustYAxisMinValueForChart( ) -> AAOptions {
205204 let aaChartModel = AAChartModel ( )
206205 . chartType ( . column) //图表类型
207206 . borderRadius ( 5 )
@@ -320,7 +319,6 @@ class DrawChartWithAAOptionsVC: AABaseChartVC {
320319 NSNull ( ) , NSNull ( ) , NSNull ( ) , NSNull ( ) , NSNull ( ) , NSNull ( ) ,
321320 0.2 , 0.8 , 5.7 , 11.3 , 17.0 , 22.0 , 24.8 , 24.1 , 20.1 , 14.1 , 8.6 , 2.5 ] )
322321 ,
323-
324322 ] )
325323
326324 let aaOptions = AAOptionsConstructor . configureChartOptions ( aaChartModel)
@@ -374,11 +372,9 @@ class DrawChartWithAAOptionsVC: AABaseChartVC {
374372
375373 let aaOptions = AAOptionsConstructor . configureChartOptions ( aaChartModel)
376374
377- aaOptions. pane (
378- AAPane ( )
379- . startAngle ( - 150 )
380- . endAngle ( 150 )
381- )
375+ aaOptions. pane ( AAPane ( )
376+ . startAngle ( - 150 )
377+ . endAngle ( 150 ) )
382378
383379 aaOptions. tooltip? . crosshairs ( false )
384380 aaOptions. yAxis?
@@ -390,7 +386,6 @@ class DrawChartWithAAOptionsVC: AABaseChartVC {
390386 . color ( " #FF0000 " )
391387 . outerRadius ( " 105% " )
392388 . thickness ( " 5% " )
393-
394389 ] )
395390
396391 return aaOptions
@@ -411,11 +406,9 @@ class DrawChartWithAAOptionsVC: AABaseChartVC {
411406
412407 let aaOptions = AAOptionsConstructor . configureChartOptions ( aaChartModel)
413408
414- aaOptions. pane (
415- AAPane ( )
416- . startAngle ( - 150 )
417- . endAngle ( 150 )
418- )
409+ aaOptions. pane ( AAPane ( )
410+ . startAngle ( - 150 )
411+ . endAngle ( 150 ) )
419412
420413 aaOptions. tooltip? . crosshairs ( false )
421414 aaOptions. yAxis?
@@ -601,11 +594,11 @@ class DrawChartWithAAOptionsVC: AABaseChartVC {
601594 ] )
602595
603596 let aaOptions = AAOptionsConstructor . configureChartOptions ( aaChartModel)
604-
597+
605598 aaOptions. chart?
606599 . resetZoomButton ( AAResetZoomButton ( )
607600 . theme ( [ " display " : " none " ] ) ) //隐藏图表缩放后的默认显示的缩放按钮
608-
601+
609602 aaOptions. tooltip?
610603 . useHTML ( true )
611604 . formatter ( """
@@ -1426,7 +1419,7 @@ function () {
14261419 }
14271420
14281421
1429- private func customAxesGridLineStyle( ) -> AAOptions {
1422+ private func customAxesGridLineStyle( ) -> AAOptions {
14301423 let aaChartModel = AAChartModel ( )
14311424 . chartType ( . line) //图表类型
14321425 . title ( " custom Axes Grid Line Style " ) //图表主标题
@@ -1602,7 +1595,7 @@ function () {
16021595 }
16031596
16041597 //三角形雷达图
1605- private func configureTriangleRadarChart( ) -> AAOptions {
1598+ private func configureTriangleRadarChart( ) -> AAOptions {
16061599 let aaChartModel = AAChartModel ( )
16071600 . chartType ( . area)
16081601 . backgroundColor ( AAColor . white)
@@ -1836,18 +1829,18 @@ function () {
18361829 . name ( " New York " )
18371830 . type ( . line)
18381831 . 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 ] )
1839- ,
1832+ ,
18401833 AASeriesElement ( )
18411834 . name ( " Berlin " )
18421835 . type ( . line)
18431836 . 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 ] )
1844- ,
1837+ ,
18451838 AASeriesElement ( )
18461839 . name ( " London " )
18471840 . type ( . area)
18481841 . 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 ] )
1849- ,
1850- ] )
1842+ ,
1843+ ] )
18511844
18521845 let aaOptions = AAOptionsConstructor . configureChartOptions ( aaChartModel)
18531846
@@ -1900,7 +1893,7 @@ function () {
19001893
19011894 return aaOptions
19021895 }
1903-
1896+
19041897}
19051898
19061899
0 commit comments