victory-brush-line 30.6.1 → 31.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -30
- package/dist/victory-brush-line.js +1104 -846
- package/dist/victory-brush-line.min.js +1 -1
- package/es/victory-brush-line.js +25 -8
- package/lib/victory-brush-line.js +30 -8
- package/package.json +2 -2
- package/src/victory-brush-line.js +308 -200
package/README.md
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
# VictoryBrushLine
|
|
3
2
|
|
|
4
3
|
`victory-brush-line@^30.0.0` exports `VictoryBrushLine`
|
|
@@ -31,7 +30,7 @@ View these docs at https://formidable.com/open-source/victory/docs/victory-brush
|
|
|
31
30
|
|
|
32
31
|
The optional `allowDrag` prop accepts a boolean that enables dragging behavior for the highlighted brush area. Resizing will still be enabled when the `allowDrag` prop is set to false.
|
|
33
32
|
|
|
34
|
-
|
|
33
|
+
_default:_ `allowDrag={true}`
|
|
35
34
|
|
|
36
35
|
### allowResize
|
|
37
36
|
|
|
@@ -39,8 +38,7 @@ The optional `allowDrag` prop accepts a boolean that enables dragging behavior f
|
|
|
39
38
|
|
|
40
39
|
The optional `allowResize` prop accepts a boolean that enables resizing the highlighted brush area. Dragging will still be enabled when the `allowResize` prop is set to false, but the dimensions of the brush area will be fixed.
|
|
41
40
|
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
_default:_ `allowResize={true}`
|
|
44
42
|
|
|
45
43
|
### brushAreaComponent
|
|
46
44
|
|
|
@@ -50,8 +48,7 @@ The `brushAreaComponent` prop specifies the component to be rendered for the int
|
|
|
50
48
|
This component will be supplied with the following props: x, y, width, height, and style.
|
|
51
49
|
When this prop is not specified, a [`Box`][] component will be rendered.
|
|
52
50
|
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
_default:_ `brushAreaComponent={<Box/>}`
|
|
55
52
|
|
|
56
53
|
### brushAreaStyle
|
|
57
54
|
|
|
@@ -70,14 +67,12 @@ an object of SVG style attributes. Styles supplied to `brushAreaStyle` are assig
|
|
|
70
67
|
|
|
71
68
|
**Note:** `cursor` styles should not be applied via this prop, as they are dynamically assigned
|
|
72
69
|
|
|
73
|
-
|
|
74
70
|
### brushAreaWidth
|
|
75
71
|
|
|
76
72
|
`type: number`
|
|
77
73
|
|
|
78
74
|
The `brushAreaWidth` prop is used to specify the width of the interactive brush region. If this prop is not supplied, the `width` prop will be used.
|
|
79
75
|
|
|
80
|
-
|
|
81
76
|
### brushComponent
|
|
82
77
|
|
|
83
78
|
`type: element`
|
|
@@ -86,15 +81,15 @@ The `brushComponent` prop specifies the component to be rendered for active brus
|
|
|
86
81
|
This component will be supplied with the following props: x, y, width, height, and style.
|
|
87
82
|
When this prop is not specified, a [`Box`][] component will be rendered.
|
|
88
83
|
|
|
89
|
-
|
|
84
|
+
_default:_ `brushComponent={<Box/>}`
|
|
90
85
|
|
|
91
86
|
### brushDomain
|
|
92
87
|
|
|
93
|
-
`type:
|
|
88
|
+
`type: array[low, high]`
|
|
94
89
|
|
|
95
90
|
The optional `brushDomain` prop describes the highlighted state. This prop should be given as an array of the minimum and maximum values of the highlighted region.
|
|
96
91
|
|
|
97
|
-
|
|
92
|
+
_example:_ `brushDomain={[50, 100]}`
|
|
98
93
|
|
|
99
94
|
### brushStyle
|
|
100
95
|
|
|
@@ -124,14 +119,12 @@ The `brushWidth` prop is used to specify the width of the active brush. If this
|
|
|
124
119
|
|
|
125
120
|
This prop specifies the class name that will be applied to the rendered element
|
|
126
121
|
|
|
127
|
-
|
|
128
122
|
### dimension
|
|
129
123
|
|
|
130
124
|
`type: "x" || "y"`
|
|
131
125
|
|
|
132
126
|
The `dimension` prop specified whether the brush will be vertical ("y"), or horizontal ("x")
|
|
133
127
|
|
|
134
|
-
|
|
135
128
|
### disable
|
|
136
129
|
|
|
137
130
|
`type: boolean`
|
|
@@ -144,25 +137,23 @@ When the `disable` prop is set to `true`, `VictoryBrushLine` events will not fir
|
|
|
144
137
|
|
|
145
138
|
The `events` prop specifies a set of events that will be attached to the brush component group. This prop should not be set manually.
|
|
146
139
|
|
|
147
|
-
|
|
148
140
|
### groupComponent
|
|
149
141
|
|
|
150
142
|
`type: element`
|
|
151
143
|
|
|
152
144
|
This prop specifies the element used to group rendered elements
|
|
153
145
|
|
|
154
|
-
|
|
155
|
-
|
|
146
|
+
_default:_ `<g/>`
|
|
156
147
|
|
|
157
148
|
### handleComponent
|
|
158
149
|
|
|
159
|
-
`type: element
|
|
150
|
+
`type: element`
|
|
160
151
|
|
|
161
152
|
The `handleComponent` prop specifies the component to be rendered for each handle.
|
|
162
153
|
This component will be supplied with the following props: x, y, width, height, and style.
|
|
163
154
|
When this prop is not specified, a [`Box`][] component will be rendered.
|
|
164
155
|
|
|
165
|
-
|
|
156
|
+
_default:_ `handleComponent={<Box/>}`
|
|
166
157
|
|
|
167
158
|
### handleStyle
|
|
168
159
|
|
|
@@ -185,8 +176,7 @@ an object of SVG style attributes. Styles supplied to `handleStyle` are assigned
|
|
|
185
176
|
|
|
186
177
|
The `handleWidth` prop is used to specify the width of each handle component.
|
|
187
178
|
|
|
188
|
-
|
|
189
|
-
|
|
179
|
+
_default:_ `handleWidth={10}`
|
|
190
180
|
|
|
191
181
|
### lineComponent
|
|
192
182
|
|
|
@@ -196,17 +186,16 @@ The `lineComponent` prop specifies the component to render for the underlying ax
|
|
|
196
186
|
This component will be supplied with the following props: x1, y1, x2, y2 and style.
|
|
197
187
|
When this prop is not specified, an [`Axis`][] component will be rendered.
|
|
198
188
|
|
|
199
|
-
|
|
200
|
-
|
|
189
|
+
_default:_ `lineComponent={<Axis/>}`
|
|
201
190
|
|
|
202
191
|
### onBrushDomainChange
|
|
203
192
|
|
|
204
193
|
`type: function`
|
|
205
194
|
|
|
206
195
|
The `onBrushDomainChange` prop specifies a callback function which will be called whenever the brush domain changes. The callback provided will be called with the following arguments:
|
|
207
|
-
- `currentDomain`: The current brush domain
|
|
208
|
-
- `props`: the current set of props for `VictoryBrushLine`
|
|
209
196
|
|
|
197
|
+
- `currentDomain`: The current brush domain
|
|
198
|
+
- `props`: the current set of props for `VictoryBrushLine`
|
|
210
199
|
|
|
211
200
|
### scale
|
|
212
201
|
|
|
@@ -233,10 +222,8 @@ The `type` is used to specify which event target a particular `VictoryBrushLine`
|
|
|
233
222
|
|
|
234
223
|
The `width` prop specified the width of both the `brush` and `brushArea`. When `brushWidth` or `brushAreaWidth` are specified, this prop will not be used
|
|
235
224
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
225
|
+
_default:_ `width={10}`
|
|
239
226
|
|
|
240
|
-
[`
|
|
241
|
-
[`
|
|
242
|
-
[`
|
|
227
|
+
[`victorybrushcontainer`]: https://formidable.com/open-source/victory/docs/victory-brush-container
|
|
228
|
+
[`box`]: https://formidable.com/open-source/victory/docs/victory-primitives#box
|
|
229
|
+
[`axis`]: https://formidable.com/open-source/victory/docs/victory-primitives#axis
|