Skip to content

Commit de2b4bd

Browse files
committed
docs: 完善示例
1 parent d9a4bd6 commit de2b4bd

File tree

1 file changed

+21
-5
lines changed

1 file changed

+21
-5
lines changed

docs/custom/demo/DoubleOverlapArea/event.tsx

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { DoubleOverlapAreaProps, IGradient, IMarkLineSpec } from '@sensoro-design/chart';
22
import { useGetState } from '@rcuse/core';
33
import { DoubleOverlapArea } from '@sensoro-design/chart';
4-
import { colorGreyPro09, colorWhite } from '@sensoro-design/chart-theme';
4+
import { colorBlue06, colorGreyPro09, colorWhite } from '@sensoro-design/chart-theme';
55
import { isNull } from 'es-toolkit/predicate';
66
import React from 'react';
77

@@ -107,10 +107,22 @@ function Example() {
107107
const markLine: IMarkLineSpec[] = [];
108108

109109
if (!isNull(selectVal)) {
110-
markLine.push(getMarkLineItem({
111-
x: selectVal,
112-
label: firstSelect ? getMarkLineLabel() : undefined,
113-
}));
110+
markLine.push(
111+
getMarkLineItem({
112+
x: selectVal,
113+
label: firstSelect ? getMarkLineLabel() : undefined,
114+
}),
115+
getMarkLineItem({
116+
x: selectVal,
117+
line: {
118+
style: {
119+
stroke: colorBlue06,
120+
lineWidth: 1,
121+
lineDash: [3, 2],
122+
},
123+
},
124+
}),
125+
);
114126
}
115127

116128
if (timeoutRef.current) {
@@ -153,6 +165,10 @@ function Example() {
153165
visible: true,
154166
line: {
155167
type: 'line',
168+
width: 1,
169+
style: {
170+
stroke: colorBlue06,
171+
},
156172
},
157173
},
158174
followTooltip: true,

0 commit comments

Comments
 (0)