Skip to content

Commit c79fea6

Browse files
author
沈建斌
committed
fix: 修复lint错误
1 parent 19e2b87 commit c79fea6

File tree

12 files changed

+43
-16
lines changed

12 files changed

+43
-16
lines changed

__tests__/unit/plots/radar/change-data-spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Radar } from '../../../../src';
2-
import { SINGLE_DATA, SERIES_DATA } from '../../../data/radar';
2+
import { SINGLE_DATA } from '../../../data/radar';
33
import { createDiv } from '../../../utils/dom';
44

55
describe('radar changeData', () => {

__tests__/unit/plots/stock/change-data-spec.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import { pick } from '@antv/util';
21
import { Stock } from '../../../../src';
3-
import { kdata, SH000001 } from '../../../data/stock';
2+
import { kdata } from '../../../data/stock';
43
import { createDiv } from '../../../utils/dom';
54

65
describe('stock', () => {

__tests__/unit/plots/stock/data-spec.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { kdata } from '../../../data/stock';
21
import { getStockData } from '../../../../src/plots/stock/utils';
32
import { TREND_FIELD, TREND_UP, TREND_DOWN, Y_FIELD } from '../../../../src/plots/stock/constant';
43

docs/api/graphic-style.en.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,8 @@ G2Plot provides support for linear gradients and circular gradients by default.
133133
> Note: `l` indicates the use of linear gradient, the green font is variable, filled by the user, separated by a blank.
134134
135135
```ts
136-
// Use gradient color stroke, gradient angle is 0, gradient starting point color #ffffff, midpoint gradient color #7ec2f3, ending gradient color #1890ff
136+
// Use gradient color stroke, gradient angle is 0, gradient starting point color #ffffff,
137+
// midpoint gradient color #7ec2f3, ending gradient color #1890ff
137138
stroke: 'l(0) 0:#ffffff 0.5:#7ec2f3 1:#1890ff';
138139
```
139140

@@ -169,7 +170,11 @@ Result:
169170
170171
```ts
171172
// example
172-
// Use gradient color to fill, the center coordinate of the starting circle of the gradient is the center point of the bounding box of the filled object, the radius is 0.1 times (the diagonal length of the bounding box / 2), the color of the starting point of the gradient #ffffff , The gradient color at the midpoint is #7ec2f3, and the gradient color at the end is #1890ff
173+
// Use gradient color to fill, the center coordinate of the starting circle of the gradient is
174+
// the center point of the bounding box of the filled object, the radius is 0.1 times (the
175+
// diagonal length of the bounding box / 2), the color of the starting point of the gradient
176+
// #ffffff , The gradient color at the midpoint is #7ec2f3, and the gradient color at the end
177+
// is #1890ff
173178
fill: 'r(0.5, 0.5, 0.1) 0:#ffffff 1:#1890ff';
174179
```
175180

docs/api/graphic-style.zh.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,8 @@ barStyle: {
169169
170170
```ts
171171
// example
172-
// 使用渐变色填充,渐变起始圆的圆心坐标为被填充物体的包围盒中心点,半径为(包围盒对角线长度 / 2) 的 0.1 倍,渐变的起始点颜色 #ffffff,中点的渐变色为 #7ec2f3,结束的渐变色为 #1890ff
172+
// 使用渐变色填充,渐变起始圆的圆心坐标为被填充物体的包围盒中心点,半径为(包围盒对角线长度 / 2) 的 0.1 倍,
173+
// 渐变的起始点颜色 #ffffff,中点的渐变色为 #7ec2f3,结束的渐变色为 #1890ff
173174
fill: 'r(0.5, 0.5, 0.1) 0:#ffffff 1:#1890ff';
174175
```
175176

docs/api/plot-api.en.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,11 @@ To disable event listening, you can unbind a listening function, or you can disa
100100
### 10. setState
101101
102102
```sign
103-
plot.setState(state?: 'active' | 'inactive' | 'selected', condition?: Function, status: boolean = true);
103+
plot.setState(
104+
state?: 'active' | 'inactive' | 'selected',
105+
condition?: Function,
106+
status: boolean = true
107+
);
104108
```
105109
106110
The status is a mechanism provided by G2. An element in G2 has three states:

docs/api/plot-api.zh.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,11 @@ plot.off(event?: string, callback?: Function);
100100
### 10. setState
101101
102102
```sign
103-
plot.setState(state?: 'active' | 'inactive' | 'selected', condition?: Function, status: boolean = true);
103+
plot.setState(
104+
state?: 'active' | 'inactive' | 'selected',
105+
condition?: Function,
106+
status: boolean = true
107+
);
104108
```
105109
106110
状态量是 G2 提供的机制,G2 中设定一个元素具备有三种状态:

docs/common/theme.zh.md

+13-3
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@
3636
```ts
3737
{
3838
theme: {
39-
colors10: ['#FF6B3B', '#626681', '#FFC100', '#9FB40F', '#76523B', '#DAD5B5', '#0E8E89', '#E19348', '#F383A2', '#247FEA']
39+
colors10: [
40+
'#FF6B3B', '#626681', '#FFC100', '#9FB40F', '#76523B', '#DAD5B5', '#0E8E89', '#E19348',
41+
'#F383A2', '#247FEA'
42+
]
4043
}
4144
}
4245
```
@@ -62,8 +65,15 @@ import { Pie, G2 } from '@antv/g2plot';
6265
// Step 1: 注册主题
6366
G2.registerTheme('new-theme', {
6467
defaultColor: '#FF6B3B',
65-
colors10: ['#FF6B3B', '#626681', '#FFC100', '#9FB40F', '#76523B', '#DAD5B5', '#0E8E89', '#E19348', '#F383A2', '#247FEA'],
66-
colors20: ['#FF6B3B', '#626681', '#FFC100', '#9FB40F', '#76523B', '#DAD5B5', '#0E8E89', '#E19348', '#F383A2', '#247FEA', '#2BCB95', '#B1ABF4', '#1D42C2', '#1D9ED1', '#D64BC0', '#255634', '#8C8C47', '#8CDAE5', '#8E283B', '#791DC9'],
68+
colors10: [
69+
'#FF6B3B', '#626681', '#FFC100', '#9FB40F', '#76523B', '#DAD5B5', '#0E8E89', '#E19348',
70+
'#F383A2', '#247FEA'
71+
],
72+
colors20: [
73+
'#FF6B3B', '#626681', '#FFC100', '#9FB40F', '#76523B', '#DAD5B5', '#0E8E89', '#E19348',
74+
'#F383A2', '#247FEA', '#2BCB95', '#B1ABF4', '#1D42C2', '#1D9ED1', '#D64BC0', '#255634',
75+
'#8C8C47', '#8CDAE5', '#8E283B', '#791DC9'
76+
],
6777
});
6878

6979
// Step 2: 使用

docs/manual/getting-started.en.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ You can import by CDN in browser or you can import local source.
1111

1212
```html
1313
<!-- import CDN source -->
14-
<script type="text/javascript" src="https://unpkg.com/@antv/g2plot@latest/dist/g2plot.min.js"></script>
14+
<script
15+
type="text/javascript"
16+
src="https://unpkg.com/@antv/g2plot@latest/dist/g2plot.min.js"
17+
></script>
1518
<script>
1619
const { Line } = G2Plot;
1720
</script>

docs/manual/getting-started.zh.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ order: 1
1111

1212
```html
1313
<!-- 引入在线资源 -->
14-
<script type="text/javascript" src="https://unpkg.com/@antv/g2plot@latest/dist/g2plot.min.js"></script>
14+
<script
15+
type="text/javascript"
16+
src="https://unpkg.com/@antv/g2plot@latest/dist/g2plot.min.js"
17+
></script>
1518
<script>
1619
const { Line } = G2Plot;
1720
</script>

src/plots/dual-axes/adaptor.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ export function animation(params: Params<DualAxesOptions>): Params<DualAxesOptio
296296
*/
297297
export function limitInPlot(params: Params<DualAxesOptions>): Params<DualAxesOptions> {
298298
const { chart, options } = params;
299-
const { yField, yAxis } = options;
299+
const { yAxis } = options;
300300

301301
commonLimitInPlot(
302302
deepAssign({}, params, {

src/plots/tiny-column/index.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { map } from '@antv/util';
21
import { Adaptor } from '../../core/adaptor';
32
import { Plot } from '../../core/plot';
43
import { getTinyData } from '../tiny-line/utils';

0 commit comments

Comments
 (0)