Skip to content

Commit 99960d5

Browse files
committed
1
1 parent d81ee93 commit 99960d5

File tree

73 files changed

+429
-423
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+429
-423
lines changed

demos/ios/Demos/Demos/Assets.xcassets/AppIcon.appiconset/Contents.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,13 @@
110110
"size" : "32x32"
111111
},
112112
{
113-
"filename" : "64x64.png",
113+
"filename" : "64x64.png",
114114
"idiom" : "mac",
115115
"scale" : "2x",
116116
"size" : "32x32"
117117
},
118118
{
119-
"filename" : "128x128.png",
119+
"filename" : "128x128.png",
120120
"idiom" : "mac",
121121
"scale" : "1x",
122122
"size" : "128x128"
@@ -128,7 +128,7 @@
128128
"size" : "128x128"
129129
},
130130
{
131-
"filename" : "256x256.png",
131+
"filename" : "256x256.png",
132132
"idiom" : "mac",
133133
"scale" : "1x",
134134
"size" : "256x256"

demos/ios/Demos/Demos/BugFixViewController.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPa
6969

7070
- (NSArray *)buglist {
7171
return @[
72-
@{@"type": @"KLineTrendBugFix1", @"name": @"K线趋势图", @"view": @"KLineTrendBugFix1"},
73-
@{@"type": @"TimeSharingBugFix1", @"name": @"顶部折线被裁", @"view": @"TimeSharingBugFix1"},
72+
// @{@"type": @"KLineTrendBugFix1", @"name": @"K线趋势图", @"view": @"KLineTrendBugFix1"},
73+
// @{@"type": @"TimeSharingBugFix1", @"name": @"顶部折线被裁", @"view": @"TimeSharingBugFix1"},
7474
@{@"type": @"MarketMovingBugFix1", @"name": @"大盘异动旗子布局", @"view": @"MarketMovingBugFix1"},
7575
];
7676
}

demos/ios/Demos/Demos/ChartListViewController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ - (void)viewDidLoad {
2020
[super viewDidLoad];
2121
self.edgesForExtendedLayout = UIRectEdgeNone;
2222
self.navigationController.navigationBar.backgroundColor = [UIColor whiteColor];
23-
self.title = NSLocalizedString(@"ChartList", @"ChartList");
23+
self.title = @"多图列表";
2424
[self.view addSubview:self.demoTable];
2525
}
2626

demos/ios/Demos/Demos/Res/mockData_baseInterval.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,4 @@
1919
}, {
2020
"year": "1960 年\n第一季度",
2121
"sales": 38
22-
}, {
23-
"year": "1962 年\n第一季度",
24-
"sales": 38
2522
}]

demos/ios/Demos/Demos/ViewController.m

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ - (UIBarButtonItem *)leftButton {
5858

5959
- (UIBarButtonItem *)rightButton {
6060
if (!_rightButton) {
61-
_rightButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"ChartList", @"ChartList") style:UIBarButtonItemStyleDone target:self action:@selector(onMultiChart)];
61+
_rightButton = [[UIBarButtonItem alloc] initWithTitle:@"多图列表" style:UIBarButtonItemStyleDone target:self action:@selector(onMultiChart)];
6262
}
6363
return _rightButton;
6464
}
@@ -75,28 +75,28 @@ - (void)onMultiChart {
7575

7676
+ (NSArray *)demoInfo {
7777
return @[
78-
@{@"type": @"baseLine", @"name": NSLocalizedString(@"BaseLineChart", "BaseLineChart"), @"view": @"BaseLineChart"},
79-
@{@"type": @"multiAxiesLine", @"name": NSLocalizedString(@"BaseLineChart2", "BaseLineChart(Dual Y-axis)"), @"view": @"BaseLineChart2"},
80-
@{@"type": @"multiLine", @"name": NSLocalizedString(@"ContrastLineChart", "ContrastLineChart"), @"view": @"ContrastLineChart"},
81-
@{@"type": @"baseArea", @"name": NSLocalizedString(@"BaseAreaChart", "BaseAreaChart"), @"view": @"BaseAreaChart"},
82-
@{@"type": @"baseArea2", @"name": NSLocalizedString(@"BaseAreaChart2", "BaseAreaChart2(with negative value)"), @"view": @"BaseAreaChart2"},
83-
@{@"type": @"baseArea3", @"name": NSLocalizedString(@"BaseAreaChart3", "BaseAreaChart3(x baseline is not 0)"), @"view": @"BaseAreaChart3"},
84-
@{@"type": @"multiArea", @"name": NSLocalizedString(@"StackedAreaChart", "StackedAreaChart"), @"view": @"StackedAreaChart"},
85-
@{@"type": @"baseInterval", @"name": NSLocalizedString(@"BaseBarChart", "BaseBarChart"), @"view": @"BaseBarChart"},
86-
@{@"type": @"baseInterval2", @"name": NSLocalizedString(@"BaseBarChart2", "BaseBarChart2"), @"view": @"BaseBarChart2"},
87-
@{@"type": @"multiInterval", @"name": NSLocalizedString(@"GroupBarChart", "GroupBarChart"), @"view": @"GroupBarChart"},
88-
@{@"type": @"multiInterval2", @"name": NSLocalizedString(@"GroupBarChart2", "GroupBarChart2(with negative value)"), @"view": @"GroupBarChart2"},
89-
@{@"type": @"multiInterval3", @"name": NSLocalizedString(@"GroupStackBarChart", "GroupStackBarChart"), @"view": @"GroupStackBarChart"},
90-
@{@"type": @"setionInterval", @"name": NSLocalizedString(@"HistogramBarChart", "HistogramBarChart"), @"view": @"HistogramBarChart"},
91-
@{@"type": @"Point", @"name": NSLocalizedString(@"BasePointChart", "BasePointChart"), @"view": @"BasePointChart"},
92-
@{@"type": @"basestrip", @"name": NSLocalizedString(@"StripChart", "StripChart"), @"view": @"StripChart"},
93-
@{@"type": @"basePie", @"name": NSLocalizedString(@"BasePieChart", "BasePieChart"), @"view": @"BasePieChart"},
94-
@{@"type": @"basePie", @"name": NSLocalizedString(@"CyclicPieChart", "CyclicPieChart"), @"view": @"CyclicPieChart"},
95-
@{@"type": @"radarArea", @"name": NSLocalizedString(@"RadarAreaChart", "RadarAreaChart"), @"view": @"RadarAreaChart"},
96-
@{@"type": @"klineDay", @"name": NSLocalizedString(@"CandleChart", "CandleChart"), @"view": @"CandleChart"},
97-
@{@"type": @"timeSharing", @"name":NSLocalizedString(@"TimeSharingChart", "TimeSharingChart"), @"view": @"TimeSharingChart"},
98-
@{@"type": @"marketMoving", @"name": NSLocalizedString(@"MarketMovingChart", "MarketMovingChart"), @"view": @"MarketMovingChart"},
99-
@{@"type": @"baseGuide", @"name": NSLocalizedString(@"BaseGuideChart", "BaseGuideChart"), @"view": @"BaseGuideChart"},
78+
@{@"type": @"baseLine", @"name": @"基础折线图", @"view": @"BaseLineUIView"},
79+
@{@"type": @"multiAxiesLine", @"name": @"基础折线图(双Y轴)", @"view": @"MultiAxiesLineUIView"},
80+
@{@"type": @"multiLine", @"name": @"对比折线图", @"view": @"MultiLineUIView"},
81+
@{@"type": @"baseArea", @"name": @"基础面积图", @"view": @"BaseAreaUIView"},
82+
@{@"type": @"baseArea2", @"name": @"基础面积图2(带负值)", @"view": @"BaseAreaUIView2"},
83+
@{@"type": @"baseArea3", @"name": @"基础面积图2(x基线不为0)", @"view": @"BaseAreaUIView3"},
84+
@{@"type": @"multiArea", @"name": @"层叠面积图", @"view": @"MultiAreaUIView"},
85+
@{@"type": @"radarArea", @"name": @"雷达面积图", @"view": @"RadarAreaUIView"},
86+
@{@"type": @"baseInterval", @"name": @"基础柱状图", @"view": @"BaseIntervalUIView"},
87+
@{@"type": @"baseInterval2", @"name": @"基础柱状图2", @"view": @"BaseInterval2UIView"},
88+
@{@"type": @"multiInterval", @"name": @"分组柱状图", @"view": @"MultintervalUIView"},
89+
@{@"type": @"multiInterval2", @"name": @"分组柱状图2(带负值)", @"view": @"MultiIntervalUIView2"},
90+
@{@"type": @"multiInterval3", @"name": @"分组层叠柱状图", @"view": @"MultiIntervalUIView3"},
91+
@{@"type": @"setionInterval", @"name": @"区间柱状图", @"view": @"SetionIntervalUIView"},
92+
@{@"type": @"Point", @"name": @"散点图", @"view": @"BasePointUIView"},
93+
@{@"type": @"basestrip", @"name": @"条状图", @"view": @"StripUIView"},
94+
@{@"type": @"basePie", @"name": @"饼图", @"view": @"BasePieUIView"},
95+
@{@"type": @"basePie", @"name": @"环形饼图", @"view": @"CyclicPieUIView"},
96+
@{@"type": @"klineDay", @"name": @"蜡烛图(日K)", @"view": @"KLineUIView"},
97+
@{@"type": @"timeSharing", @"name": @"股票分时图", @"view": @"TimeSharingUIView"},
98+
@{@"type": @"marketMoving", @"name": @"大盘异动", @"view": @"MarketMovingUIView"},
99+
@{@"type": @"baseGuide", @"name": @"辅助组件", @"view": @"BaseGuideUIView"},
100100
];
101101
}
102102

demos/ios/Demos/Demos/en.lproj/Localizable.strings

Lines changed: 0 additions & 30 deletions
This file was deleted.

demos/ios/Demos/Demos/views/BaseAreaChart.h

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
#import "BaseLineUIView.h"
3+
4+
NS_ASSUME_NONNULL_BEGIN
5+
6+
@interface BaseAreaUIView : BaseLineUIView
7+
8+
@end
9+
10+
NS_ASSUME_NONNULL_END

demos/ios/Demos/Demos/views/BaseAreaChart.m renamed to demos/ios/Demos/Demos/views/BaseAreaUIView.m

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1-
#import "BaseAreaChart.h"
1+
2+
3+
#import "BaseAreaUIView.h"
24
#import <F2/F2.h>
35

4-
@implementation BaseAreaChart
6+
@implementation BaseAreaUIView
57

68
- (void)chartRender {
79
NSString *jsonPath = [[NSBundle mainBundle] pathForResource:@"Res/mockData_baseArea" ofType:@"json"];
810
NSString *jsonData = [NSString stringWithContentsOfFile:jsonPath encoding:NSUTF8StringEncoding error:nil];
911
self.chart.clear();
10-
self.chart.canvas(self.canvasView).padding(20, 10, 0, 0.f);
11-
self.chart.source([F2Utils toJsonArray:jsonData]);
12+
self.chart.canvas(self.canvasView).padding(20, 10, 0, 0.f).source(jsonData);
1213
self.chart.scale(@"tem", @{@"min": @(0)});
1314
self.chart.axis(@"time", @{@"grid": @(NO), @"label": @{@"textAlign": @"start"}});
1415
self.chart.line().position(@"time*tem").fixedSize(2).fixedShape(@"smooth");
1516
self.chart.area().position(@"time*tem").fixedShape(@"smooth").fixedColor([F2Utils toJsonString:@{
1617
@"colorStops": @[@{@"offset": @(0.f), @"color": @"#ff0000"}, @{@"offset": @(1.f), @"color": @"#ffffff"}],
17-
@"position": @[@(0), @(0), @(0), @(self.canvasView.frame.size.height * [UIScreen mainScreen].scale)]
18+
@"position": @[@(0), @(0), @(0), @(self.chartSize.height * [UIScreen mainScreen].scale)]
1819
}]);
1920
self.chart.point().position(@"time*tem").fixedColor(@"#000000").style(@{
2021
@"custom": [F2Callback callback:^NSDictionary *_Nonnull(NSDictionary *_Nonnull param) {
@@ -25,7 +26,6 @@ - (void)chartRender {
2526
}]
2627
});
2728
self.chart.animate(@YES);
28-
self.chart.tooltip(@{});
2929
self.chart.render();
3030
}
3131

demos/ios/Demos/Demos/views/BaseAreaChart2.h renamed to demos/ios/Demos/Demos/views/BaseAreaUIView2.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
// Copyright © 2020 com.alipay.xgraph. All rights reserved.
77
//
88

9-
#import "BaseLineChart.h"
9+
#import "BaseLineUIView.h"
1010

1111
NS_ASSUME_NONNULL_BEGIN
1212

13-
@interface BaseAreaChart2 : BaseLineChart
13+
@interface BaseAreaUIView2 : BaseLineUIView
1414

1515
@end
1616

0 commit comments

Comments
 (0)