victory-tooltip 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 +12 -13
- package/dist/victory-tooltip.js +1090 -851
- package/dist/victory-tooltip.min.js +1 -1
- package/es/victory-tooltip.js +3 -5
- package/lib/victory-tooltip.js +3 -5
- package/package.json +2 -2
- package/src/flyout.js +28 -14
- package/src/victory-tooltip.js +184 -162
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ The `active` prop specifies whether the tooltip component should be displayed.
|
|
|
20
20
|
|
|
21
21
|
When true, tooltip events will set the `active` prop on both data and label elements.
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
_default:_ `activateData={false}`
|
|
24
24
|
|
|
25
25
|
### angle
|
|
26
26
|
|
|
@@ -65,7 +65,7 @@ The `dy` prop defines a vertical shift from the `y` coordinate.
|
|
|
65
65
|
|
|
66
66
|
The `events` prop attaches arbitrary event handlers to the label component. This prop should be given as an object of event names and corresponding event handlers. When events are provided via Victory's event system, event handlers will be called with the event, the props of the component is attached to, and an eventKey.
|
|
67
67
|
|
|
68
|
-
|
|
68
|
+
_examples:_ `events={{onClick: (evt) => alert("x: " + evt.clientX)}}`
|
|
69
69
|
|
|
70
70
|
### flyoutStyle
|
|
71
71
|
|
|
@@ -79,10 +79,9 @@ The `style` prop applies SVG style properties to the rendered flyout container.
|
|
|
79
79
|
|
|
80
80
|
The `flyoutComponent` prop takes a component instance which will be used to create the flyout path for each tooltip. The new element created from the passed `flyoutComponent` will be supplied with the following properties: x, y, dx, dy, index, datum, cornerRadius, pointerLength, pointerWidth, width, height, orientation, style, and events. Any of these props may be overridden by passing in props to the supplied component, or modified or ignored within the custom component itself. If `flyoutComponent` is omitted, a default [Flyout][] component will be created with props described above.
|
|
81
81
|
|
|
82
|
-
|
|
82
|
+
_examples:_ `flyoutComponent={<Flyout x={50} y={50}/>}`, `flyoutComponent={<MyCustomFlyout/>}`
|
|
83
83
|
|
|
84
|
-
|
|
85
|
-
*default:* `<Flyout/>`
|
|
84
|
+
_default:_ `<Flyout/>`
|
|
86
85
|
|
|
87
86
|
### groupComponent
|
|
88
87
|
|
|
@@ -90,7 +89,7 @@ The `flyoutComponent` prop takes a component instance which will be used to crea
|
|
|
90
89
|
|
|
91
90
|
The `groupComponent` prop takes a component instance which will be used to create group elements for use within container elements. This prop defaults to a `<g>` tag.
|
|
92
91
|
|
|
93
|
-
|
|
92
|
+
_default:_ `groupComponent={<g/>}`
|
|
94
93
|
|
|
95
94
|
### height
|
|
96
95
|
|
|
@@ -116,9 +115,9 @@ The `index` prop represents the index of the datum in the data array.
|
|
|
116
115
|
|
|
117
116
|
The `labelComponent` prop takes a component instance which will be used to render each tooltip label. The new element created from the passed `labelComponent` will be supplied with the following properties: x, y, index, datum, verticalAnchor, textAnchor, style, text, and events. Any of these props may be overridden by passing in props to the supplied component, or modified or ignored within the custom component itself. If `labelComponent` is omitted, a new [VictoryLabel][] will be created with the props described above.
|
|
118
117
|
|
|
119
|
-
|
|
118
|
+
_examples:_ `labelComponent={<VictoryLabel dy={20}/>}`, `labelComponent={<MyCustomLabel/>}`
|
|
120
119
|
|
|
121
|
-
|
|
120
|
+
_default:_ `<VictoryLabel/>`
|
|
122
121
|
|
|
123
122
|
### orientation
|
|
124
123
|
|
|
@@ -174,9 +173,9 @@ The `x` prop defines the x coordinate to use as a basis for positioning the tool
|
|
|
174
173
|
|
|
175
174
|
The `y` prop defines the y coordinate to use as a basis for positioning the tooltip element.
|
|
176
175
|
|
|
177
|
-
[
|
|
178
|
-
[
|
|
179
|
-
[
|
|
180
|
-
[
|
|
181
|
-
[
|
|
176
|
+
[flyout]: https://formidable.com/open-source/victory/docs/victory-primitives#flyout
|
|
177
|
+
[victorylabel]: https://formidable.com/open-source/victory/docs/victory-label
|
|
178
|
+
[victoryportal]: https://formidable.com/open-source/victory/docs/victory-portal
|
|
179
|
+
[victorycontainer]: https://formidable.com/open-source/victory/docs/victory-container
|
|
180
|
+
[portal]: https://github.com/FormidableLabs/victory-core/blob/master/src/victory-portal/portal.js
|
|
182
181
|
[approximate text size]: https://github.com/FormidableLabs/victory-core/blob/master/src/victory-util/textsize.js
|