Skip to content

Commit 1af59bf

Browse files
author
duxinyue.dxy
committed
feat: change startonzero to startatzero
1 parent 248ffa2 commit 1af59bf

Some content is hidden

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

56 files changed

+159
-207
lines changed

__tests__/area.spec.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ test.describe('Area component tests', () => {
146146
await renderChartAndSnapshot(page, spec, 'area-grouped-academy.png');
147147
});
148148

149-
test('area-startOnZero', async ({ page }) => {
149+
test('area-start-at-zero', async ({ page }) => {
150150
const spec = {
151151
type: 'area',
152152
data: [
@@ -162,8 +162,10 @@ test.describe('Area component tests', () => {
162162
],
163163
axisXTitle: 'Time',
164164
axisYTitle: 'Value',
165-
startOnZero: true,
165+
style: {
166+
startAtZero: true,
167+
},
166168
};
167-
await renderChartAndSnapshot(page, spec, 'area-startOnZero.png');
169+
await renderChartAndSnapshot(page, spec, 'area-start-at-zero.png');
168170
});
169171
});

__tests__/bar.spec.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ test.describe('Bar component tests', () => {
232232
await renderChartAndSnapshot(page, spec, 'bar-data-no-group-stacked.png');
233233
});
234234

235-
test('bar-startOnZero', async ({ page }) => {
235+
test('bar-start-at-zero', async ({ page }) => {
236236
const spec = {
237237
type: 'bar',
238238
data: [
@@ -244,8 +244,10 @@ test.describe('Bar component tests', () => {
244244
],
245245
axisXTitle: 'Type',
246246
axisYTitle: 'Sold',
247-
startOnZero: true,
247+
style: {
248+
startAtZero: true,
249+
},
248250
};
249-
await renderChartAndSnapshot(page, spec, 'bar-startOnZero.png');
251+
await renderChartAndSnapshot(page, spec, 'bar-start-at-zero.png');
250252
});
251253
});

__tests__/boxplot.spec.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1893,14 +1893,16 @@ test.describe('Boxplot component tests', () => {
18931893
await renderChartAndSnapshot(page, spec, 'boxplot-style.png');
18941894
});
18951895

1896-
test('boxplot-startOnZero', async ({ page }) => {
1896+
test('boxplot-start-at-zero', async ({ page }) => {
18971897
const spec = {
18981898
type: 'boxplot',
18991899
data: boxplotData,
19001900
axisXTitle: 'category',
19011901
axisYTitle: 'value',
1902-
startOnZero: true,
1902+
style: {
1903+
startAtZero: true,
1904+
},
19031905
};
1904-
await renderChartAndSnapshot(page, spec, 'boxplot-startOnZero.png');
1906+
await renderChartAndSnapshot(page, spec, 'boxplot-start-at-zero.png');
19051907
});
19061908
});

__tests__/column.spec.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ test.describe('Column component tests', () => {
235235
await renderChartAndSnapshot(page, spec, 'column-data-no-group-stacked.png');
236236
});
237237

238-
test('column-startOnZero', async ({ page }) => {
238+
test('column-start-at-zero', async ({ page }) => {
239239
const spec = {
240240
type: 'column',
241241
data: [
@@ -247,8 +247,10 @@ test.describe('Column component tests', () => {
247247
],
248248
axisXTitle: 'Type',
249249
axisYTitle: 'Sold',
250-
startOnZero: true,
250+
style: {
251+
startAtZero: true,
252+
},
251253
};
252-
await renderChartAndSnapshot(page, spec, 'column-startOnZero.png');
254+
await renderChartAndSnapshot(page, spec, 'column-start-at-zero.png');
253255
});
254256
});

__tests__/dual-axes.spec.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ test.describe('Dual Axes component tests', () => {
113113
await renderChartAndSnapshot(page, spec, 'dual-axes-custom-style.png');
114114
});
115115

116-
test('dual-axes-startOnZero', async ({ page }) => {
116+
test('dual-axes-start-at-zero', async ({ page }) => {
117117
const spec = {
118118
type: 'dual-axes',
119119
categories: ['Mon.', 'Tues.', 'Wed.', 'Thur.', 'Fri.'],
@@ -129,8 +129,10 @@ test.describe('Dual Axes component tests', () => {
129129
axisYTitle: '完成时间',
130130
},
131131
],
132-
startOnZero: true,
132+
style: {
133+
startAtZero: true,
134+
},
133135
};
134-
await renderChartAndSnapshot(page, spec, 'dual-axes-startOnZero.png');
136+
await renderChartAndSnapshot(page, spec, 'dual-axes-start-at-zero.png');
135137
});
136138
});

__tests__/histogram.spec.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ test.describe('Histogram component tests', () => {
7171
await renderChartAndSnapshot(page, spec, 'histogram-style.png');
7272
});
7373

74-
test('histogram-startOnZero', async ({ page }) => {
74+
test('histogram-start-at-zero', async ({ page }) => {
7575
const spec = {
7676
type: 'histogram',
7777
data: [
@@ -83,8 +83,10 @@ test.describe('Histogram component tests', () => {
8383
binNumber: 10,
8484
axisXTitle: 'range',
8585
axisYTitle: 'count',
86-
startOnZero: true,
86+
style: {
87+
startAtZero: true,
88+
},
8789
};
88-
await renderChartAndSnapshot(page, spec, 'histogram-startOnZero.png');
90+
await renderChartAndSnapshot(page, spec, 'histogram-start-at-zero.png');
8991
});
9092
});

__tests__/line.spec.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ test.describe('Line component tests', () => {
184184
await renderChartAndSnapshot(page, spec, 'line-grouped-custom-style.png');
185185
});
186186

187-
test('line-startOnZero', async ({ page }) => {
187+
test('line-start-at-zero', async ({ page }) => {
188188
const spec = {
189189
type: 'line',
190190
data: [
@@ -200,8 +200,10 @@ test.describe('Line component tests', () => {
200200
],
201201
axisXTitle: 'Time',
202202
axisYTitle: 'Value',
203-
startOnZero: true,
203+
style: {
204+
startAtZero: true,
205+
},
204206
};
205-
await renderChartAndSnapshot(page, spec, 'line-startOnZero.png');
207+
await renderChartAndSnapshot(page, spec, 'line-start-at-zero.png');
206208
});
207209
});

__tests__/scatter.spec.ts

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -91,26 +91,4 @@ test.describe('Scatter component tests', () => {
9191
};
9292
await renderChartAndSnapshot(page, spec, 'scatter-group.png');
9393
});
94-
95-
test('scatter-startOnZero', async ({ page }) => {
96-
const spec = {
97-
type: 'scatter',
98-
data: [
99-
{ x: 161.2, y: 51.6 },
100-
{ x: 167.5, y: 59.0 },
101-
{ x: 159.5, y: 49.2 },
102-
{ x: 157.0, y: 63.0 },
103-
{ x: 155.8, y: 53.6 },
104-
{ x: 170.0, y: 59.0 },
105-
{ x: 159.1, y: 47.6 },
106-
{ x: 166.0, y: 69.8 },
107-
{ x: 176.2, y: 66.8 },
108-
{ x: 160.2, y: 75.2 },
109-
],
110-
axisXTitle: '身高',
111-
axisYTitle: '体重',
112-
startOnZero: true,
113-
};
114-
await renderChartAndSnapshot(page, spec, 'scatter-startOnZero.png');
115-
});
11694
});
File renamed without changes.

0 commit comments

Comments
 (0)