Skip to content

Commit 7d4abed

Browse files
committed
Organize AAOptionsWithJS into Composer/VC
Reorganize AAOptionsWithJS demo: move JS function implementations into a new Composer group and introduce JSFunctionForAA*Composer classes/headers; add corresponding ViewController stubs under ViewController; rename/relocate several .m/.h files and update imports accordingly. Update AAChartKitDemo.xcodeproj to add new groups and source/file references, and remove the old VC header files that were replaced.
1 parent 4a5052b commit 7d4abed

24 files changed

Lines changed: 380 additions & 201 deletions

AAChartKitDemo.xcodeproj/project.pbxproj

Lines changed: 56 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@
7878
7172A3F11E763EA6000D5B99 /* AAChartKitTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 7172A3F01E763EA6000D5B99 /* AAChartKitTests.m */; };
7979
7172A3FC1E763EA6000D5B99 /* AAChartKitUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 7172A3FB1E763EA6000D5B99 /* AAChartKitUITests.m */; };
8080
8418479C28B8D0E300094106 /* JSFunctionForAAChartEventsComposer.m in Sources */ = {isa = PBXBuildFile; fileRef = 8418479B28B8D0E300094106 /* JSFunctionForAAChartEventsComposer.m */; };
81+
841F495B2F39CE0E007B01F0 /* JSFunctionForAAOptionsComposer.m in Sources */ = {isa = PBXBuildFile; fileRef = 841F49562F39CE0E007B01F0 /* JSFunctionForAAOptionsComposer.m */; };
82+
841F495C2F39CE0E007B01F0 /* JSFunctionForAALegendComposer.m in Sources */ = {isa = PBXBuildFile; fileRef = 841F49542F39CE0E007B01F0 /* JSFunctionForAALegendComposer.m */; };
83+
841F495D2F39CE0E007B01F0 /* JSFunctionForAAAxisComposer.m in Sources */ = {isa = PBXBuildFile; fileRef = 841F49522F39CE0E007B01F0 /* JSFunctionForAAAxisComposer.m */; };
84+
841F495E2F39CE0E007B01F0 /* JSFunctionForAATooltipV2Composer.m in Sources */ = {isa = PBXBuildFile; fileRef = 841F495A2F39CE0E007B01F0 /* JSFunctionForAATooltipV2Composer.m */; };
85+
841F495F2F39CE0E007B01F0 /* JSFunctionForAATooltipComposer.m in Sources */ = {isa = PBXBuildFile; fileRef = 841F49582F39CE0E007B01F0 /* JSFunctionForAATooltipComposer.m */; };
8186
843E5E162E7B9F230030D36E /* AAAxisTitle.m in Sources */ = {isa = PBXBuildFile; fileRef = 843E5E152E7B9F230030D36E /* AAAxisTitle.m */; };
8287
844F11442B639CB600ADEB1C /* JSFunctionForAAChartEventsComposer2.m in Sources */ = {isa = PBXBuildFile; fileRef = 844F11432B639CB500ADEB1C /* JSFunctionForAAChartEventsComposer2.m */; };
8388
84526E0E2CEC733600EB2563 /* AAGauge.m in Sources */ = {isa = PBXBuildFile; fileRef = 84526E0D2CEC733600EB2563 /* AAGauge.m */; };
@@ -328,6 +333,16 @@
328333
7172A4581E763FDB000D5B99 /* PrefixHeader.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PrefixHeader.pch; sourceTree = "<group>"; };
329334
8418479A28B8D0E300094106 /* JSFunctionForAAChartEventsComposer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSFunctionForAAChartEventsComposer.h; sourceTree = "<group>"; };
330335
8418479B28B8D0E300094106 /* JSFunctionForAAChartEventsComposer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = JSFunctionForAAChartEventsComposer.m; sourceTree = "<group>"; };
336+
841F49512F39CE0E007B01F0 /* JSFunctionForAAAxisComposer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSFunctionForAAAxisComposer.h; sourceTree = "<group>"; };
337+
841F49522F39CE0E007B01F0 /* JSFunctionForAAAxisComposer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = JSFunctionForAAAxisComposer.m; sourceTree = "<group>"; };
338+
841F49532F39CE0E007B01F0 /* JSFunctionForAALegendComposer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSFunctionForAALegendComposer.h; sourceTree = "<group>"; };
339+
841F49542F39CE0E007B01F0 /* JSFunctionForAALegendComposer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = JSFunctionForAALegendComposer.m; sourceTree = "<group>"; };
340+
841F49552F39CE0E007B01F0 /* JSFunctionForAAOptionsComposer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSFunctionForAAOptionsComposer.h; sourceTree = "<group>"; };
341+
841F49562F39CE0E007B01F0 /* JSFunctionForAAOptionsComposer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = JSFunctionForAAOptionsComposer.m; sourceTree = "<group>"; };
342+
841F49572F39CE0E007B01F0 /* JSFunctionForAATooltipComposer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSFunctionForAATooltipComposer.h; sourceTree = "<group>"; };
343+
841F49582F39CE0E007B01F0 /* JSFunctionForAATooltipComposer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = JSFunctionForAATooltipComposer.m; sourceTree = "<group>"; };
344+
841F49592F39CE0E007B01F0 /* JSFunctionForAATooltipV2Composer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSFunctionForAATooltipV2Composer.h; sourceTree = "<group>"; };
345+
841F495A2F39CE0E007B01F0 /* JSFunctionForAATooltipV2Composer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = JSFunctionForAATooltipV2Composer.m; sourceTree = "<group>"; };
331346
843E5E142E7B9F230030D36E /* AAAxisTitle.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AAAxisTitle.h; sourceTree = "<group>"; };
332347
843E5E152E7B9F230030D36E /* AAAxisTitle.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AAAxisTitle.m; sourceTree = "<group>"; };
333348
844F11422B639CB500ADEB1C /* JSFunctionForAAChartEventsComposer2.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSFunctionForAAChartEventsComposer2.h; sourceTree = "<group>"; };
@@ -703,6 +718,40 @@
703718
path = AAChartKitDemoUITests;
704719
sourceTree = "<group>";
705720
};
721+
841F494F2F39CDD8007B01F0 /* ViewController */ = {
722+
isa = PBXGroup;
723+
children = (
724+
44C8C48F226F4D4100AB9E50 /* JSFunctionForAATooltipVC.h */,
725+
44C8C490226F4D4100AB9E50 /* JSFunctionForAATooltipVC.m */,
726+
84E0D36D28F2DBBD004031BE /* JSFunctionForAATooltipVC2.h */,
727+
84E0D36E28F2DBBD004031BE /* JSFunctionForAATooltipVC2.m */,
728+
8463FDDC28CB1D5300392C50 /* JSFunctionForAAAxisVC.h */,
729+
8463FDDD28CB1D5300392C50 /* JSFunctionForAAAxisVC.m */,
730+
8463FDDF28CB1F5F00392C50 /* JSFunctionForAALegendVC.h */,
731+
8463FDE028CB1F5F00392C50 /* JSFunctionForAALegendVC.m */,
732+
84E0D36428F2D690004031BE /* JSFunctionForAAOptionsVC.h */,
733+
84E0D36528F2D690004031BE /* JSFunctionForAAOptionsVC.m */,
734+
);
735+
path = ViewController;
736+
sourceTree = "<group>";
737+
};
738+
841F49502F39CDE5007B01F0 /* Composer */ = {
739+
isa = PBXGroup;
740+
children = (
741+
841F49512F39CE0E007B01F0 /* JSFunctionForAAAxisComposer.h */,
742+
841F49522F39CE0E007B01F0 /* JSFunctionForAAAxisComposer.m */,
743+
841F49532F39CE0E007B01F0 /* JSFunctionForAALegendComposer.h */,
744+
841F49542F39CE0E007B01F0 /* JSFunctionForAALegendComposer.m */,
745+
841F49552F39CE0E007B01F0 /* JSFunctionForAAOptionsComposer.h */,
746+
841F49562F39CE0E007B01F0 /* JSFunctionForAAOptionsComposer.m */,
747+
841F49572F39CE0E007B01F0 /* JSFunctionForAATooltipComposer.h */,
748+
841F49582F39CE0E007B01F0 /* JSFunctionForAATooltipComposer.m */,
749+
841F49592F39CE0E007B01F0 /* JSFunctionForAATooltipV2Composer.h */,
750+
841F495A2F39CE0E007B01F0 /* JSFunctionForAATooltipV2Composer.m */,
751+
);
752+
path = Composer;
753+
sourceTree = "<group>";
754+
};
706755
8441C0AD2C733A0300A6F784 /* AAAxis */ = {
707756
isa = PBXGroup;
708757
children = (
@@ -801,16 +850,8 @@
801850
844F4D432C08580A0019F786 /* AAOptionsWithJS */ = {
802851
isa = PBXGroup;
803852
children = (
804-
44C8C48F226F4D4100AB9E50 /* JSFunctionForAATooltipVC.h */,
805-
44C8C490226F4D4100AB9E50 /* JSFunctionForAATooltipVC.m */,
806-
84E0D36D28F2DBBD004031BE /* JSFunctionForAATooltipVC2.h */,
807-
84E0D36E28F2DBBD004031BE /* JSFunctionForAATooltipVC2.m */,
808-
8463FDDC28CB1D5300392C50 /* JSFunctionForAAAxisVC.h */,
809-
8463FDDD28CB1D5300392C50 /* JSFunctionForAAAxisVC.m */,
810-
8463FDDF28CB1F5F00392C50 /* JSFunctionForAALegendVC.h */,
811-
8463FDE028CB1F5F00392C50 /* JSFunctionForAALegendVC.m */,
812-
84E0D36428F2D690004031BE /* JSFunctionForAAOptionsVC.h */,
813-
84E0D36528F2D690004031BE /* JSFunctionForAAOptionsVC.m */,
853+
841F494F2F39CDD8007B01F0 /* ViewController */,
854+
841F49502F39CDE5007B01F0 /* Composer */,
814855
);
815856
path = AAOptionsWithJS;
816857
sourceTree = "<group>";
@@ -1293,6 +1334,11 @@
12931334
8481C2E32DF98039006EFC41 /* BasicChartComposer.m in Sources */,
12941335
44711747217E2C88009D9FB0 /* SpecialChartComposer.m in Sources */,
12951336
84B548B626F1CD4E00D4CAFC /* PieChartOptionsVC.m in Sources */,
1337+
841F495B2F39CE0E007B01F0 /* JSFunctionForAAOptionsComposer.m in Sources */,
1338+
841F495C2F39CE0E007B01F0 /* JSFunctionForAALegendComposer.m in Sources */,
1339+
841F495D2F39CE0E007B01F0 /* JSFunctionForAAAxisComposer.m in Sources */,
1340+
841F495E2F39CE0E007B01F0 /* JSFunctionForAATooltipV2Composer.m in Sources */,
1341+
841F495F2F39CE0E007B01F0 /* JSFunctionForAATooltipComposer.m in Sources */,
12961342
1E66D213210AF4ED007EAB8C /* AAPie.m in Sources */,
12971343
449D447A21CFDF5D00E43D9C /* AAPlotBandsElement.m in Sources */,
12981344
1E66D200210AF4ED007EAB8C /* AAPlotOptions.m in Sources */,
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#import <Foundation/Foundation.h>
2+
3+
@class AAOptions;
4+
5+
NS_ASSUME_NONNULL_BEGIN
6+
7+
@interface JSFunctionForAAAxisComposer : NSObject
8+
9+
+ (id)chartConfigurationWithSelectedIndex:(NSInteger)selectedIndex;
10+
11+
+ (AAOptions *)customYAxisLabels;
12+
+ (AAOptions *)customYAxisLabels2;
13+
+ (AAOptions *)customAreaChartXAxisLabelsTextUnitSuffix1;
14+
+ (AAOptions *)customAreaChartXAxisLabelsTextUnitSuffix2;
15+
+ (AAOptions *)configureTheAxesLabelsFormattersOfDoubleYAxesChart;
16+
+ (AAOptions *)configureTheAxesLabelsFormattersOfDoubleYAxesChart2;
17+
+ (AAOptions *)configureTheAxesLabelsFormattersOfDoubleYAxesChart3;
18+
+ (AAOptions *)customColumnChartXAxisLabelsTextByInterceptTheFirstFourCharacters;
19+
+ (AAOptions *)customSpiderChartStyle;
20+
+ (AAOptions *)customizeEveryDataLabelSinglelyByDataLabelsFormatter;
21+
+ (AAOptions *)customXAxisLabelsBeImages;
22+
+ (AAOptions *)loadImageForAATooltip;
23+
24+
@end
25+
26+
NS_ASSUME_NONNULL_END

AAChartKitDemo/Demo/AAOptionsWithJS/JSFunctionForAAAxisComposer.m renamed to AAChartKitDemo/Demo/AAOptionsWithJS/Composer/JSFunctionForAAAxisComposer.m

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,16 @@
3232
3333
*/
3434

35-
#import "JSFunctionForAAAxisVC.h"
35+
#import "JSFunctionForAAAxisComposer.h"
36+
#import "AAChartKit.h"
3637

37-
@interface JSFunctionForAAAxisVC ()
38+
@interface JSFunctionForAAAxisComposer ()
3839

3940
@end
4041

41-
@implementation JSFunctionForAAAxisVC
42+
@implementation JSFunctionForAAAxisComposer
4243

43-
- (void)viewDidLoad {
44-
[super viewDidLoad];
45-
// Do any additional setup after loading the view.
46-
}
47-
48-
- (id)chartConfigurationWithSelectedIndex:(NSInteger)selectedIndex {
44+
+ (id)chartConfigurationWithSelectedIndex:(NSInteger)selectedIndex {
4945
switch (selectedIndex) {
5046
case 0: return [self customYAxisLabels];//自定义Y轴文字
5147
case 1: return [self customYAxisLabels2];//自定义Y轴文字2
@@ -67,7 +63,7 @@ - (id)chartConfigurationWithSelectedIndex:(NSInteger)selectedIndex {
6763

6864

6965
//https://github.com/AAChartModel/AAChartKit/issues/675
70-
- (AAOptions *)customYAxisLabels {
66+
+ (AAOptions *)customYAxisLabels {
7167
AAChartModel *aaChartModel = AAChartModel.new
7268
.chartTypeSet(AAChartTypeLine)//图表类型
7369
.colorsThemeSet(@[@"#04d69f",@"#1e90ff",@"#ef476f",@"#ffd066",])
@@ -102,7 +98,7 @@ - (AAOptions *)customYAxisLabels {
10298
return aaOptions;
10399
}
104100

105-
- (AAOptions *)customYAxisLabels2 {
101+
+ (AAOptions *)customYAxisLabels2 {
106102
AAChartModel *aaChartModel = AAChartModel.new
107103
.chartTypeSet(AAChartTypeLine)//图表类型
108104
.markerSymbolStyleSet(AAChartSymbolStyleTypeBorderBlank)//折线连接点样式为外边缘空白
@@ -153,7 +149,7 @@ - (AAOptions *)customYAxisLabels2 {
153149
}
154150

155151
//Stupid method
156-
- (AAOptions *)customAreaChartXAxisLabelsTextUnitSuffix1 {
152+
+ (AAOptions *)customAreaChartXAxisLabelsTextUnitSuffix1 {
157153
AAChartModel *aaChartModel = AAChartModel.new
158154
.chartTypeSet(AAChartTypeArea)//图表类型
159155
.titleSet(@"Custom X Axis Labels Text")//图表主标题
@@ -194,7 +190,7 @@ - (AAOptions *)customAreaChartXAxisLabelsTextUnitSuffix1 {
194190
}
195191

196192
//Smart method
197-
- (AAOptions *)customAreaChartXAxisLabelsTextUnitSuffix2 {
193+
+ (AAOptions *)customAreaChartXAxisLabelsTextUnitSuffix2 {
198194
AAOptions *aaOptions = [self customAreaChartXAxisLabelsTextUnitSuffix1];
199195
aaOptions.xAxis
200196
.labelsSet(AALabels.new
@@ -208,7 +204,7 @@ - (AAOptions *)customAreaChartXAxisLabelsTextUnitSuffix2 {
208204

209205
//https://github.com/AAChartModel/AAChartKit/issues/901
210206
//https://github.com/AAChartModel/AAChartKit/issues/952
211-
- (AAOptions *)configureTheAxesLabelsFormattersOfDoubleYAxesChart {
207+
+ (AAOptions *)configureTheAxesLabelsFormattersOfDoubleYAxesChart {
212208
AAChart *aaChart = AAChart.new
213209
.backgroundColorSet(AAColor.whiteColor);
214210

@@ -329,7 +325,7 @@ - (AAOptions *)configureTheAxesLabelsFormattersOfDoubleYAxesChart {
329325
}
330326

331327
//https://github.com/AAChartModel/AAChartKit/issues/1324
332-
- (AAOptions *)configureTheAxesLabelsFormattersOfDoubleYAxesChart2 {
328+
+ (AAOptions *)configureTheAxesLabelsFormattersOfDoubleYAxesChart2 {
333329
AAChart *aaChart = AAChart.new
334330
.backgroundColorSet(AAColor.whiteColor);
335331

@@ -437,7 +433,7 @@ - (AAOptions *)configureTheAxesLabelsFormattersOfDoubleYAxesChart2 {
437433

438434
//https://github.com/AAChartModel/AAChartKit/issues/1324
439435
//https://github.com/AAChartModel/AAChartKit/issues/1330
440-
- (AAOptions *)configureTheAxesLabelsFormattersOfDoubleYAxesChart3 {
436+
+ (AAOptions *)configureTheAxesLabelsFormattersOfDoubleYAxesChart3 {
441437
AAChart *aaChart = AAChart.new
442438
.backgroundColorSet(AAColor.whiteColor);
443439

@@ -552,7 +548,7 @@ - (AAOptions *)configureTheAxesLabelsFormattersOfDoubleYAxesChart3 {
552548
}
553549

554550
//https://github.com/AAChartModel/AAChartKit/issues/1217
555-
- (AAOptions *)customColumnChartXAxisLabelsTextByInterceptTheFirstFourCharacters {
551+
+ (AAOptions *)customColumnChartXAxisLabelsTextByInterceptTheFirstFourCharacters {
556552
AAChartModel *aaChartModel = AAChartModel.new
557553
.chartTypeSet(AAChartTypeBar)//图表类型
558554
.titleSet(@"春江花月夜")//图表主标题
@@ -612,7 +608,7 @@ - (AAOptions *)customColumnChartXAxisLabelsTextByInterceptTheFirstFourCharacters
612608
}
613609

614610
//https://github.com/AAChartModel/AAChartKit/issues/852 自定义蜘蛛🕷图样式
615-
- (AAOptions *)customSpiderChartStyle {
611+
+ (AAOptions *)customSpiderChartStyle {
616612
NSArray *categoryArr = @[
617613
@"周转天数(天)",
618614
@"订单满足率",
@@ -693,7 +689,7 @@ - (AAOptions *)customSpiderChartStyle {
693689

694690

695691
// Refer to the issue https://github.com/AAChartModel/AAChartKit/issues/589
696-
- (AAOptions *)customizeEveryDataLabelSinglelyByDataLabelsFormatter {
692+
+ (AAOptions *)customizeEveryDataLabelSinglelyByDataLabelsFormatter {
697693
AAChartModel *aaChartModel = AAChartModel.new
698694
.chartTypeSet(AAChartTypeAreaspline)//图表类型
699695
.dataLabelsEnabledSet(true)
@@ -732,7 +728,7 @@ - (AAOptions *)customizeEveryDataLabelSinglelyByDataLabelsFormatter {
732728

733729
// Refer to GitHub issue: https://github.com/AAChartModel/AAChartKit/issues/938
734730
// Refer to online chart sample: https://www.highcharts.com/demo/column-comparison
735-
- (AAOptions *)customXAxisLabelsBeImages {
731+
+ (AAOptions *)customXAxisLabelsBeImages {
736732
NSArray *nameArr = @[
737733
@"South Korea",
738734
@"Japan",
@@ -824,7 +820,7 @@ - (AAOptions *)customXAxisLabelsBeImages {
824820
// Refer to GitHub issue: https://github.com/AAChartModel/AAChartKit/issues/938
825821
// Refer to online chart sample: https://www.highcharts.com/demo/column-comparison
826822
//https://github.com/AAChartModel/AAChartKit/issues/1404
827-
- (AAOptions *)loadImageForAATooltip {
823+
+ (AAOptions *)loadImageForAATooltip {
828824
NSArray *nameArr = @[
829825
@"South Korea",
830826
@"Japan",
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#import <Foundation/Foundation.h>
2+
3+
@class AAOptions;
4+
5+
NS_ASSUME_NONNULL_BEGIN
6+
7+
@interface JSFunctionForAALegendComposer : NSObject
8+
9+
+ (id)chartConfigurationWithSelectedIndex:(NSInteger)selectedIndex;
10+
11+
+ (AAOptions *)disableLegendClickEventForNormalChart;
12+
+ (AAOptions *)disableLegendClickEventForPieChart;
13+
+ (AAOptions *)customLegendItemClickEvent;
14+
15+
@end
16+
17+
NS_ASSUME_NONNULL_END

AAChartKitDemo/Demo/AAOptionsWithJS/JSFunctionForAALegendComposer.m renamed to AAChartKitDemo/Demo/AAOptionsWithJS/Composer/JSFunctionForAALegendComposer.m

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,16 @@
3232
3333
*/
3434

35-
#import "JSFunctionForAALegendVC.h"
35+
#import "JSFunctionForAALegendComposer.h"
36+
#import "AAChartKit.h"
3637

37-
@interface JSFunctionForAALegendVC ()
38+
@interface JSFunctionForAALegendComposer ()
3839

3940
@end
4041

41-
@implementation JSFunctionForAALegendVC
42+
@implementation JSFunctionForAALegendComposer
4243

43-
- (void)viewDidLoad {
44-
[super viewDidLoad];
45-
// Do any additional setup after loading the view.
46-
}
47-
48-
- (id)chartConfigurationWithSelectedIndex:(NSInteger)selectedIndex {
44+
+ (id)chartConfigurationWithSelectedIndex:(NSInteger)selectedIndex {
4945
switch (selectedIndex) {
5046
case 0: return [self disableLegendClickEventForNormalChart];//禁用普通图表的图例点击事件
5147
case 1: return [self disableLegendClickEventForPieChart];//禁用饼图的图例点击事件
@@ -56,7 +52,7 @@ - (id)chartConfigurationWithSelectedIndex:(NSInteger)selectedIndex {
5652
}
5753
}
5854

59-
- (AAOptions *)disableLegendClickEventForNormalChart {
55+
+ (AAOptions *)disableLegendClickEventForNormalChart {
6056
AAChartModel *aaChartModel = AAChartModel.new
6157
.chartTypeSet(AAChartTypeAreaspline)
6258
.stackingSet(AAChartStackingTypeNormal)
@@ -105,7 +101,7 @@ - (AAOptions *)disableLegendClickEventForNormalChart {
105101
//https://github.com/AAChartModel/AAChartKit-Swift/issues/391
106102
//https://github.com/AAChartModel/AAChartKit-Swift/issues/393
107103
//https://github.com/AAChartModel/AAChartKit/issues/1180
108-
- (AAOptions *)disableLegendClickEventForPieChart {
104+
+ (AAOptions *)disableLegendClickEventForPieChart {
109105
AAChartModel *aaChartModel = AAChartModel.new
110106
.chartTypeSet(AAChartTypePie)
111107
.backgroundColorSet(AAColor.whiteColor)
@@ -166,7 +162,7 @@ - (AAOptions *)disableLegendClickEventForPieChart {
166162
//显示 --> 隐藏;
167163
//隐藏 --> 显示;
168164
//Customized legengItemClick Event online: http://code.hcharts.cn/rencht/hhhhLv/share
169-
- (AAOptions *)customLegendItemClickEvent {
165+
+ (AAOptions *)customLegendItemClickEvent {
170166
AAChartModel *aaChartModel = AAChartModel.new
171167
.chartTypeSet(AAChartTypeColumn)
172168
.stackingSet(AAChartStackingTypeNormal)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#import <Foundation/Foundation.h>
2+
3+
@class AAOptions;
4+
5+
NS_ASSUME_NONNULL_BEGIN
6+
7+
@interface JSFunctionForAAOptionsComposer : NSObject
8+
9+
+ (AAOptions *)customDoubleXAxesChart;
10+
+ (AAOptions *)disableColumnChartUnselectEventEffectBySeriesPointEventClickFunction;
11+
+ (AAOptions *)customizeEveryDataLabelSinglelyByDataLabelsFormatter;
12+
+ (AAOptions *)configureColorfulDataLabelsForPieChart;
13+
+ (AAOptions *)customizeCrosshairsStyle;
14+
15+
@end
16+
17+
NS_ASSUME_NONNULL_END

0 commit comments

Comments
 (0)