From 9c90f9b182e57a3cb42c1547ef309aa056a6e5ff Mon Sep 17 00:00:00 2001 From: visiky <736929286@qq.com> Date: Sun, 17 Oct 2021 20:29:29 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix(area):=20=E4=BF=AE=E5=A4=8D=E9=9D=A2?= =?UTF-8?q?=E7=A7=AF=E5=9B=BE=E4=B8=AD=E6=8A=98=E7=BA=BF=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E4=BC=A0=E5=85=A5=20seriesField?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/plots/area/adaptor.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plots/area/adaptor.ts b/src/plots/area/adaptor.ts index f200d2c2dc..f9486e8d9d 100644 --- a/src/plots/area/adaptor.ts +++ b/src/plots/area/adaptor.ts @@ -66,7 +66,10 @@ function geometry(params: Params): Params { }, }, }); - const second = deepAssign({}, primary, { options: { tooltip: false } }); + // 线默认 2px + const second = deepAssign({ options: { line: { size: 2 } } }, primary, { + options: { sizeField: seriesField, tooltip: false }, + }); const pointParams = deepAssign({}, primary, { options: { tooltip: false, state: pointState } }); // area geometry 处理 From 83144bcf55233a1899f9509ae94468679c1376d6 Mon Sep 17 00:00:00 2001 From: visiky <736929286@qq.com> Date: Tue, 19 Oct 2021 07:34:43 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix(area):=20=E4=BF=AE=E5=A4=8D=E9=9D=A2?= =?UTF-8?q?=E7=A7=AF=E5=9B=BE=E5=8D=95=E6=B5=8B=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- __tests__/unit/plots/area/line-spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tests__/unit/plots/area/line-spec.ts b/__tests__/unit/plots/area/line-spec.ts index 80fb199b1f..a79a887c96 100644 --- a/__tests__/unit/plots/area/line-spec.ts +++ b/__tests__/unit/plots/area/line-spec.ts @@ -47,7 +47,7 @@ describe('area', () => { const point = area.chart.geometries.find((g: Geometry) => g.type === 'line'); expect(point.shapeType).toBe('line'); // @ts-ignore - expect(point.attributeOption.size.values).toEqual([2]); + expect(point.attributeOption.size.values).toEqual(2); // @ts-ignore // expect(point.attributeOption.shape.values).toEqual(['circle']);