File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed
packages/chart/src/TwoStateArea Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change 1
1
import type { TwoStateAreaProps } from './types' ;
2
+ import { darkColors } from '@sensoro-design/chart-theme' ;
2
3
import { AreaChart } from '@visactor/react-vchart' ;
3
4
import { merge } from '@visactor/vutils' ;
4
5
import React , { useMemo } from 'react' ;
@@ -14,7 +15,7 @@ export function TwoStateArea(props: TwoStateAreaProps) {
14
15
xAxes,
15
16
yAxes,
16
17
// eslint-disable-next-line react/no-unstable-default-props
17
- color = [ '#5C8BE6' , '#3EB390' ] ,
18
+ color = [ darkColors . blue2 , '#3EB390' ] ,
18
19
tooltip,
19
20
legend,
20
21
...rest
@@ -59,6 +60,23 @@ export function TwoStateArea(props: TwoStateAreaProps) {
59
60
area = { {
60
61
style : {
61
62
curveType : 'step' ,
63
+ fill : {
64
+ gradient : 'linear' ,
65
+ x0 : 0.5 ,
66
+ y0 : 0 ,
67
+ x1 : 0.5 ,
68
+ y1 : 1 ,
69
+ stops : [
70
+ {
71
+ offset : 0 ,
72
+ opacity : 0.25 ,
73
+ } ,
74
+ {
75
+ offset : 1 ,
76
+ opacity : 0 ,
77
+ } ,
78
+ ] ,
79
+ } ,
62
80
} ,
63
81
} }
64
82
line = { lineData }
You can’t perform that action at this time.
0 commit comments