File tree Expand file tree Collapse file tree 3 files changed +34
-41
lines changed Expand file tree Collapse file tree 3 files changed +34
-41
lines changed Original file line number Diff line number Diff line change @@ -95,21 +95,18 @@ export default function AreaComponent<TDatum>({
95
95
cx = { getX ( datum ) }
96
96
cy = { getY ( datum , 1 ) ?? NaN }
97
97
stroke = "rgba(33,33,33,0.5)"
98
- fill = "transparent"
99
98
style = { {
100
99
// @ts -ignore
101
100
r : 2 ,
102
- opacity : 1 ,
103
- ...( ! secondaryAxis . showDatumElements
104
- ? {
105
- opacity : 0 ,
106
- pointerEvents : 'none' ,
107
- }
108
- : { } ) ,
109
101
...style ,
110
102
...style . circle ,
111
103
...dataStyle ,
112
104
...dataStyle . circle ,
105
+ ...( ! ( secondaryAxis . showDatumElements ?? true )
106
+ ? {
107
+ opacity : 0 ,
108
+ }
109
+ : { } ) ,
113
110
} }
114
111
/>
115
112
)
Original file line number Diff line number Diff line change @@ -11,14 +11,6 @@ const pathDefaultStyle = {
11
11
strokeWidth : 2 ,
12
12
}
13
13
14
- const circleDefaultStyle = {
15
- r : 2 ,
16
- strokeWidth : '1' ,
17
- stroke : '#000000' ,
18
- fill : '#000000' ,
19
- opacity : 1 ,
20
- }
21
-
22
14
export default function Line < TDatum > ( {
23
15
primaryAxis,
24
16
secondaryAxis,
@@ -76,31 +68,36 @@ export default function Line<TDatum>({
76
68
77
69
return (
78
70
< g key = { `lines-${ i } ` } >
79
- { ( secondaryAxis . showDatumElements ?? true ) &&
80
- series . datums . map ( ( datum , i ) => {
81
- const dataStyle = getDatumStatusStyle ( datum , focusedDatum )
71
+ { series . datums . map ( ( datum , i ) => {
72
+ const dataStyle = getDatumStatusStyle ( datum , focusedDatum )
82
73
83
- return (
84
- < circle
85
- key = { i }
86
- ref = { el => {
87
- datum . element = el
88
- } }
89
- r = { 2 }
90
- cx = { getX ( datum ) }
91
- cy = { getY ( datum ) }
92
- stroke = "rgba(33,33,33,0.5)"
93
- fill = "transparent"
94
- style = { {
95
- ...circleDefaultStyle ,
96
- ...style ,
97
- ...style . circle ,
98
- ...dataStyle ,
99
- ...dataStyle . circle ,
100
- } }
101
- />
102
- )
103
- } ) }
74
+ return (
75
+ < circle
76
+ key = { i }
77
+ ref = { el => {
78
+ datum . element = el
79
+ } }
80
+ r = { 2 }
81
+ cx = { getX ( datum ) }
82
+ cy = { getY ( datum ) }
83
+ stroke = "rgba(33,33,33,0.5)"
84
+ fill = "transparent"
85
+ style = { {
86
+ // @ts -ignore
87
+ r : 2 ,
88
+ ...style ,
89
+ ...style . circle ,
90
+ ...dataStyle ,
91
+ ...dataStyle . circle ,
92
+ ...( ! ( secondaryAxis . showDatumElements ?? true )
93
+ ? {
94
+ opacity : 0 ,
95
+ }
96
+ : { } ) ,
97
+ } }
98
+ />
99
+ )
100
+ } ) }
104
101
< path d = { linePath } style = { lineStyle } />
105
102
</ g >
106
103
)
Original file line number Diff line number Diff line change @@ -215,7 +215,6 @@ export type AxisOptionsBase = {
215
215
primaryAxisId ?: string
216
216
elementType ?: 'line' | 'area' | 'bar'
217
217
showDatumElements ?: boolean
218
- showOrphanDatumElements ?: boolean
219
218
curve ?: CurveFactory
220
219
invert ?: boolean
221
220
position : Position
You can’t perform that action at this time.
0 commit comments