77//
88
99#import " AAChartModelListVC.h"
10+ #import " BasicChartVC.h"
11+ #import " SpecialChartVC.h"
12+ #import " CustomStyleChartVC.h"
13+ #import " MixedChartVC.h"
1014#import " CustomStyleForScatterChartVC.h"
1115#import " CustomStyleForBubbleChartVC.h"
16+ #import " CustomTableViewCell.h"
17+ #import " AAEasyTool.h"
1218
1319@interface AAChartModelListVC ()
1420
@@ -19,36 +25,215 @@ @implementation AAChartModelListVC
1925- (void )viewDidLoad {
2026 [super viewDidLoad ];
2127 // Do any additional setup after loading the view.
28+ self.title = @" AAChartModel" ;
2229
2330 self.sectionTitleArr = @[
31+ @" Basic Type---基础类型" ,
32+ @" Special Type---特别类型" ,
33+ @" Custom Style---自定义风格样式图表" ,
34+ @" Mixed Type Chart---混合图表" ,
2435 @" Scatter Chart With Custom Style | 一些自定义风格样式散点图" ,
2536 @" Bubble Chart With Custom Style | 一些自定义风格样式气泡图" ,
2637 ];
2738
2839 self.chartTypeTitleArr = @[
40+ /* Basic Type*/
41+ @[
42+ @" Column Chart---柱形图" ,
43+ @" Bar Chart---条形图" ,
44+ @" Area Chart---折线填充图" ,
45+ @" Areaspline Chart---曲线填充图" ,
46+ @" Line Chart---折线图" ,
47+ @" Spline Chart---曲线图" ,
48+ @" Step Line Chart---直方折线图" ,
49+ @" Step Area Chart---直方折线填充图" ,
50+ @" Scatter Chart---散点图"
51+ ],
52+ /* Special Type*/
53+ @[
54+ @" Pie Chart---扇形图" ,
55+ @" Bubble Chart---气泡图" ,
56+ @" Packed Bubble Chart---紧凑气泡图" ,
57+ @" Scatter Chart---散点图" ,
58+ @" Area Range Chart---折线区域面积图" ,
59+ @" Area Spline range Chart---曲线区域面积图" ,
60+ @" Column Pyramid Chart---柱形金字塔图" ,
61+ @" Column Range Chart---柱形范围图" ,
62+ @" Box Plot Chart---箱线图" ,
63+ @" Water Fall---瀑布图" ,
64+ @" Pyramid Chart---金字塔图" ,
65+ @" Funnel Chart---漏斗图" ,
66+ @" Error Bar Chart---误差图" ,
67+ @" Gauge Chart---仪表盘图" ,
68+ @" Polygon Chart---多边形图" ,
69+ ],
70+ /* Custom Style*/
71+ @[
72+ @" Colorful Column Chart---多彩条形图" ,
73+ @" Colorful Gradient Color Chart---多彩颜色渐变条形图" ,
74+ @" Discontinuous Data Chart---数值不连续的图表" ,
75+ @" Mixed Line Chart---虚实线混合折线图" ,
76+ @" Colorful Column Chart---多彩柱形图" ,
77+ @" Gradient Color Bar Chart---颜色渐变条形图" ,
78+ @" configureXAxisHaveAAZonesElementChart--- X 轴阈值分割区" ,
79+ @" configureYAxisHaveAAZonesElementChart--- Y 轴带有阈值分割区" ,
80+ @" Step Line Chart---直方折线图" ,
81+ @" Step Area Chart---直方折线填充图" ,
82+ @" Nightingale Rose Chart---南丁格尔玫瑰图" ,
83+ @" Specific Data Customize Datalabel---指定 data 元素自定义 Datalabel" ,
84+ @" Chart With Shadow Style---带有阴影效果の图表" ,
85+ @" Colorful gradient Areaspline Chart---多层次渐变区域填充图" ,
86+ @" Colorful gradient Spline Chart---多层次渐变曲线图" ,
87+ @" Gradient Color Areaspline Chart---半透明渐变效果区域填充图" ,
88+ @" Special Style Marker Of Single Data Element Chart---指定单个数据元素的 Marker 为特殊样式" ,
89+ @" Special Style Column Of Single Data Element Chart---指定单个数据元素的 Column 为特殊样式" ,
90+ @" configure Area Chart Threshold---自定义阈值" ,
91+ @" custom Scatter Chart Marker Symbol Content---自定义散点图的标志点内容" ,
92+ @" custom Line Chart Marker Symbol Content---自定义折线图的标志点内容" ,
93+ @" Area Chart with minus---带有负数的区域填充图" ,
94+ @" splineChartHoverLineWithNoChangeAndCustomMarkerStatesHoverStyle---曲线图禁用选中变粗&&自定义选中后的 marker 样式" ,
95+ @" Pentagon Radar Chart---五角形雷达图" ,
96+ @" Hexagon Radar Chart---六角形雷达图" ,
97+ @" adjustYAxisMaxAndMinValues---调整 X 轴和 Y 轴最大值" ,
98+ @" custom Special Style DataLabel Of Single Data Element Chart---指定单个数据元素的 DataLabel 为特殊样式" ,
99+ @" custom Bar Chart Hover Color and Select Color---自定义条形图手指滑动颜色和单个长条被选中颜色" ,
100+ @" custom Line Chart Chart Hover And Select Halo Style---自定义直线图手指略过和选中的 Halo 样式" ,
101+ @" custom Spline Chart Marker States Hover Style---自定义曲线图手指略过时的 Marker 样式" ,
102+ @" customNormalStackingChartDataLabelsContentAndStyle---自定义堆积柱状图 DataLabels 的内容及样式" ,
103+ @" upsideDownPyramidChart---倒立的金字塔图" ,
104+ @" doubleLayerPieChart---双层嵌套扇形图" ,
105+ @" doubleLayerDoubleColorsPieChart---双层嵌套双颜色主题扇形图" ,
106+ @" disableSomeOfLinesMouseTrackingEffect---针对部分数据列关闭鼠标或手指跟踪行为" ,
107+ @" configureColorfulShadowChart---彩色阴影效果的曲线图" ,
108+ @" configureColorfulDataLabelsStepLineChart---彩色 DataLabels 的直方折线图" ,
109+ @" configureColorfulGradientColorAndColorfulDataLabelsStepAreaChart---彩色渐变效果且彩色 DataLabels 的直方折线填充图" ,
110+ @" disableSplineChartMarkerHoverEffect---禁用曲线图的手指滑动 marker 点的光圈变化放大的效果" ,
111+ @" configureMaxAndMinDataLabelsForChart---为图表最大值最小值添加 DataLabels 标记" ,
112+ @" customVerticalXAxisCategoriesLabelsByHTMLBreakLineTag---通过 HTML 的换行标签来实现图表的 X 轴的 分类文字标签的换行效果" ,
113+ @" noMoreGroupingAndOverlapEachOtherColumnChart---不分组的相互重叠柱状图📊" ,
114+ @" noMoreGroupingAndNestedColumnChart---不分组的嵌套柱状图📊" ,
115+ @" topRoundedCornersStackingColumnChart---顶部为圆角的堆积柱状图📊" ,
116+ @" freeStyleRoundedCornersStackingColumnChart---各个圆角自由独立设置的堆积柱状图📊" ,
117+ @" customColumnChartBorderStyleAndStatesHoverColor---自定义柱状图 border 样式及手指掠过图表 series 元素时的柱形颜色" ,
118+ @" customLineChartWithColorfulMarkersAndLines---彩色连接点和连接线的折线图📈" ,
119+ @" customLineChartWithColorfulMarkersAndLines2---彩色连接点和连接线的多组折线的折线图📈" ,
120+ @" drawLineChartWithPointsCoordinates---通过点坐标来绘制折线图" ,
121+ @" configureSpecialStyleColumnForNegativeDataMixedPositiveData---为正负数混合的柱形图自定义特殊样式效果" ,
122+ @" configureMultiLevelStopsArrGradientColorAreasplineMixedLineChart---多层次半透明渐变效果的曲线填充图混合折线图📈" ,
123+ @" connectNullsForSingleAASeriesElement---为单个 AASeriesElement 单独设置是否断点重连" ,
124+ @" lineChartsWithLargeDifferencesInTheNumberOfDataInDifferentSeriesElement---测试有多组数据时, 数据量较大时, 不同组数据量差距较大时的折线图📈" ,
125+ @" customAreasplineChartWithColorfulGradientColorZones---彩色渐变区域填充图📈" ,
126+ @" noMoreGroupingAndNestedColumnClickedChangeColorChart---不分组的嵌套柱状图,点击后变色📊" ,
127+ @" noMoreGroupingAndNestedColumnClickedChangeColorChart2---不分组的嵌套柱状图,点击后变色📊2"
128+ ],
129+ /* Mixed Type Chart*/
130+ @[
131+ @" Arearange Mixed Line---面积范围均线图" ,
132+ @" Columnrange Mixed Line---柱形范围图混合折线图" ,
133+ @" Stacking Column Mixed Line---堆积柱形图混合折线图" ,
134+ @" Dash Style Types Mixed---多种类型曲线混合图" ,
135+ @" All Line Dash Style Types Mixed Chart---所有类型曲线混合图" ,
136+ @" Negative Color Mixed Column Chart---基准线以下异色混合柱状图📊" ,
137+ @" scatterMixedLine---散点图混合折线图" ,
138+ @" Negative Color Mixed Bubble Chart---基准线以下异色混合气泡图" ,
139+ @" Polygon Mixed Scatter---多边形混合散点图" ,
140+ @" Polar Chart Mixed---极地混合图" ,
141+ @" configure Column Mixed Scatter Chart---柱形图混合散点图" ,
142+ @" Negative Color Mixed Areaspline chart---基准线以下异色混合曲线填充图" ,
143+ @" Negative Color Mixed Area chart---基准线以下异色混合直线填充图" ,
144+ @" Area Chart Mixed Step Area Chart---折线填充和直方折线填充混合图"
145+ ],
29146
30147 /* Custom Style For Scatter Chart*/
31148 @[
32- @" customScatterChartMarkerSymbolContent" ,
33- @" drawLineMixedScatterChartWithPointsCoordinates2" ,
149+ @" customScatterChartMarkerSymbolContent---自定义散点图的标志点内容 " ,
150+ @" drawLineMixedScatterChartWithPointsCoordinates2---通过点坐标绘制折线混合散点图 " ,
34151 ],
35152 /* Custom Style For Bubble Chart*/
36153 @[
37- @" negativeColorMixedBubbleChart" ,
38- @" showAARadialGradientPositionAllEnumValuesWithBubbleChart" ,
154+ @" negativeColorMixedBubbleChart---基准线以下异色混合气泡图 " ,
155+ @" showAARadialGradientPositionAllEnumValuesWithBubbleChart---气泡图径向渐变位置枚举示例 " ,
39156 ],
40157 ];
41158
42159 self.view .backgroundColor = [UIColor whiteColor ];
43160 [self setUpMainTableView ];
44161}
45162
163+ - (UITableViewCell *)tableView : (UITableView *)tableView cellForRowAtIndexPath : (NSIndexPath *)indexPath {
164+ CustomTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier: @" CustomTableViewCell" ];
165+ cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
166+
167+ cell.numberLabel .text = [NSString stringWithFormat: @" %ld " , indexPath.row + 1 ];
168+ cell.numberLabel .layer .masksToBounds = true ;
169+ cell.numberLabel .layer .cornerRadius = 10 ;
170+ UIColor *numBgColor = [AAEasyTool colorWithHexString: @[@" #5470c6" ,
171+ @" #91cc75" ,
172+ @" #fac858" ,
173+ @" #ee6666" ,
174+ @" #73c0de" ,
175+ @" #3ba272" ,
176+ @" #fc8452" ,
177+ @" #9a60b4" ,
178+ @" #ea7ccc" ][indexPath.section % 9 ]];
179+ cell.numberLabel .backgroundColor = numBgColor;
180+ cell.numberLabel .textColor = UIColor.whiteColor ;
181+
182+ NSString *textStr = self.chartTypeTitleArr [(NSUInteger )indexPath.section][(NSUInteger )indexPath.row];
183+ NSArray <NSString *> *textStrArr = [textStr componentsSeparatedByString: @" ---" ];
184+ cell.titleLabel .text = textStrArr.firstObject ;
185+ cell.subtitleLabel .text = textStrArr.count > 1 ? textStrArr[1 ] : @" " ;
186+
187+ if (indexPath.row % 2 == 0 ) {
188+ cell.backgroundColor = [AAEasyTool colorWithHexString: @" #FFF0F5" ];
189+ } else {
190+ cell.backgroundColor = UIColor.whiteColor ;
191+ }
192+
193+ return cell;
194+ }
195+
46196- (void )tableView : (UITableView *)tableView didSelectRowAtIndexPath : (NSIndexPath *)indexPath {
47197 NSUInteger row = (NSUInteger ) indexPath.row ;
48198 NSUInteger section = (NSUInteger ) indexPath.section ;
49199
50200 switch (section) {
51- case 0 : {
201+ case 0 : {
202+ BasicChartVC *vc = BasicChartVC.new ;
203+ vc.chartType = row;
204+ vc.hidesBottomBarWhenPushed = YES ;
205+ [self .navigationController pushViewController: vc animated: YES ];
206+ }
207+ break ;
208+
209+ case 1 : {
210+ SpecialChartVC *vc = SpecialChartVC.new ;
211+ vc.selectedIndex = row;
212+ vc.navigationItemTitleArr = self.chartTypeTitleArr [section];
213+ vc.hidesBottomBarWhenPushed = YES ;
214+ [self .navigationController pushViewController: vc animated: YES ];
215+ }
216+ break ;
217+
218+ case 2 : {
219+ CustomStyleChartVC *vc = CustomStyleChartVC.new ;
220+ vc.selectedIndex = row;
221+ vc.navigationItemTitleArr = self.chartTypeTitleArr [section];
222+ vc.hidesBottomBarWhenPushed = YES ;
223+ [self .navigationController pushViewController: vc animated: YES ];
224+ }
225+ break ;
226+
227+ case 3 : {
228+ MixedChartVC *vc = MixedChartVC.new ;
229+ vc.selectedIndex = row;
230+ vc.navigationItemTitleArr = self.chartTypeTitleArr [section];
231+ vc.hidesBottomBarWhenPushed = YES ;
232+ [self .navigationController pushViewController: vc animated: YES ];
233+ }
234+ break ;
235+
236+ case 4 : {
52237 CustomStyleForScatterChartVC *vc = CustomStyleForScatterChartVC.new ;
53238 vc.selectedIndex = row;
54239 vc.navigationItemTitleArr = self.chartTypeTitleArr [section];
@@ -57,7 +242,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
57242 }
58243 break ;
59244
60- case 1 : {
245+ case 5 : {
61246 CustomStyleForBubbleChartVC *vc = CustomStyleForBubbleChartVC.new ;
62247 vc.selectedIndex = row;
63248 vc.navigationItemTitleArr = self.chartTypeTitleArr [section];
0 commit comments