@patternfly/react-docs 7.6.0-prerelease.7 → 7.6.0-prerelease.8

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.
Files changed (162) hide show
  1. package/package.json +12 -13
  2. package/patternfly-docs/generated/components/about-modal/react.js +149 -0
  3. package/patternfly-docs/generated/components/accordion/react.js +262 -0
  4. package/patternfly-docs/generated/components/action-list/react.js +144 -0
  5. package/patternfly-docs/generated/components/alert/react-demos.js +56 -0
  6. package/patternfly-docs/generated/components/alert/react.js +1433 -0
  7. package/patternfly-docs/generated/components/avatar/react.js +166 -0
  8. package/patternfly-docs/generated/components/back-to-top/react-demos.js +60 -0
  9. package/patternfly-docs/generated/components/back-to-top/react.js +77 -0
  10. package/patternfly-docs/generated/components/backdrop/react.js +64 -0
  11. package/patternfly-docs/generated/components/background-image/react.js +62 -0
  12. package/patternfly-docs/generated/components/badge/react.js +97 -0
  13. package/patternfly-docs/generated/components/banner/react-demos.js +57 -0
  14. package/patternfly-docs/generated/components/banner/react.js +148 -0
  15. package/patternfly-docs/generated/components/brand/react.js +142 -0
  16. package/patternfly-docs/generated/components/breadcrumb/react.js +206 -0
  17. package/patternfly-docs/generated/components/button/react-demos.js +57 -0
  18. package/patternfly-docs/generated/components/button/react.js +826 -0
  19. package/patternfly-docs/generated/components/card/react-demos.js +201 -0
  20. package/patternfly-docs/generated/components/card/react.js +1015 -0
  21. package/patternfly-docs/generated/components/charts/area-chart/-Victory.js +1350 -0
  22. package/patternfly-docs/generated/components/charts/bar-chart/-Victory.js +1334 -0
  23. package/patternfly-docs/generated/components/charts/box-plot-chart/-Victory.js +1282 -0
  24. package/patternfly-docs/generated/components/charts/bullet-chart/-Victory.js +848 -0
  25. package/patternfly-docs/generated/components/charts/colors-for-charts/-Victory.js +192 -0
  26. package/patternfly-docs/generated/components/charts/donut-chart/-Victory.js +426 -0
  27. package/patternfly-docs/generated/components/charts/donut-utilization-chart/-Victory.js +804 -0
  28. package/patternfly-docs/generated/components/charts/legends/-Victory.js +3230 -0
  29. package/patternfly-docs/generated/components/charts/line-chart/-Victory.js +1178 -0
  30. package/patternfly-docs/generated/components/charts/line-chart/ECharts.js +525 -0
  31. package/patternfly-docs/generated/components/charts/patterns/-Victory.js +3382 -0
  32. package/patternfly-docs/generated/components/charts/pie-chart/-Victory.js +377 -0
  33. package/patternfly-docs/generated/components/charts/resize-observer/-Victory.js +2475 -0
  34. package/patternfly-docs/generated/components/charts/sankey-chart/ECharts.js +538 -0
  35. package/patternfly-docs/generated/components/charts/scatter-chart/-Victory.js +1551 -0
  36. package/patternfly-docs/generated/components/charts/skeletons/-Victory.js +4115 -0
  37. package/patternfly-docs/generated/components/charts/sparkline-chart/-Victory.js +955 -0
  38. package/patternfly-docs/generated/components/charts/stack-chart/-Victory.js +1173 -0
  39. package/patternfly-docs/generated/components/charts/threshold-chart/-Victory.js +1166 -0
  40. package/patternfly-docs/generated/components/charts/tooltips/-Victory.js +413 -0
  41. package/patternfly-docs/generated/components/chip/react-deprecated.js +323 -0
  42. package/patternfly-docs/generated/components/clipboard-copy/react.js +373 -0
  43. package/patternfly-docs/generated/components/code-block/react.js +148 -0
  44. package/patternfly-docs/generated/components/code-editor/react.js +659 -0
  45. package/patternfly-docs/generated/components/compass/react-demos.js +147 -0
  46. package/patternfly-docs/generated/components/compass/react.js +440 -0
  47. package/patternfly-docs/generated/components/content/react.js +248 -0
  48. package/patternfly-docs/generated/components/data-list/react-demos.js +90 -0
  49. package/patternfly-docs/generated/components/data-list/react.js +709 -0
  50. package/patternfly-docs/generated/components/date-and-time/calendar-month/react.js +283 -0
  51. package/patternfly-docs/generated/components/date-and-time/date-and-time-picker/react-demos.js +64 -0
  52. package/patternfly-docs/generated/components/date-and-time/date-picker/react-demos.js +83 -0
  53. package/patternfly-docs/generated/components/date-and-time/date-picker/react.js +395 -0
  54. package/patternfly-docs/generated/components/date-and-time/time-picker/react.js +241 -0
  55. package/patternfly-docs/generated/components/description-list/react-demos.js +58 -0
  56. package/patternfly-docs/generated/components/description-list/react.js +743 -0
  57. package/patternfly-docs/generated/components/divider/react.js +126 -0
  58. package/patternfly-docs/generated/components/drag-and-drop/react-demos.js +351 -0
  59. package/patternfly-docs/generated/components/drag-and-drop/react-deprecated.js +184 -0
  60. package/patternfly-docs/generated/components/drag-and-drop/react.js +137 -0
  61. package/patternfly-docs/generated/components/drawer/react.js +598 -0
  62. package/patternfly-docs/generated/components/dual-list-selector/react-deprecated.js +772 -0
  63. package/patternfly-docs/generated/components/dual-list-selector/react.js +594 -0
  64. package/patternfly-docs/generated/components/empty-state/react.js +199 -0
  65. package/patternfly-docs/generated/components/expandable-section/react-demos.js +65 -0
  66. package/patternfly-docs/generated/components/expandable-section/react.js +408 -0
  67. package/patternfly-docs/generated/components/file-upload/multiple-file-upload/react-demos.js +52 -0
  68. package/patternfly-docs/generated/components/file-upload/multiple-file-upload/react.js +398 -0
  69. package/patternfly-docs/generated/components/file-upload/simple-file-upload/react.js +749 -0
  70. package/patternfly-docs/generated/components/forms/checkbox/react.js +222 -0
  71. package/patternfly-docs/generated/components/forms/form/react.js +1106 -0
  72. package/patternfly-docs/generated/components/forms/form-select/react.js +208 -0
  73. package/patternfly-docs/generated/components/forms/radio/react.js +212 -0
  74. package/patternfly-docs/generated/components/forms/text-area/react.js +160 -0
  75. package/patternfly-docs/generated/components/forms/text-input/react.js +216 -0
  76. package/patternfly-docs/generated/components/helper-text/react-demos.js +180 -0
  77. package/patternfly-docs/generated/components/helper-text/react.js +164 -0
  78. package/patternfly-docs/generated/components/hero/react.js +88 -0
  79. package/patternfly-docs/generated/components/hint/react.js +169 -0
  80. package/patternfly-docs/generated/components/icon/react.js +215 -0
  81. package/patternfly-docs/generated/components/input-group/react.js +182 -0
  82. package/patternfly-docs/generated/components/jump-links/react-demos.js +154 -0
  83. package/patternfly-docs/generated/components/jump-links/react.js +212 -0
  84. package/patternfly-docs/generated/components/label/react-demos.js +57 -0
  85. package/patternfly-docs/generated/components/label/react.js +417 -0
  86. package/patternfly-docs/generated/components/list/react.js +175 -0
  87. package/patternfly-docs/generated/components/login-page/react.js +587 -0
  88. package/patternfly-docs/generated/components/masthead/react-demos.js +79 -0
  89. package/patternfly-docs/generated/components/masthead/react.js +291 -0
  90. package/patternfly-docs/generated/components/menus/application-launcher/react-demos.js +769 -0
  91. package/patternfly-docs/generated/components/menus/context-selector/react-demos.js +665 -0
  92. package/patternfly-docs/generated/components/menus/custom-menus/react-demos.js +187 -0
  93. package/patternfly-docs/generated/components/menus/dropdown/react-templates.js +163 -0
  94. package/patternfly-docs/generated/components/menus/dropdown/react.js +998 -0
  95. package/patternfly-docs/generated/components/menus/menu/react.js +1540 -0
  96. package/patternfly-docs/generated/components/menus/menu-toggle/react.js +747 -0
  97. package/patternfly-docs/generated/components/menus/options-menu/react-demos.js +508 -0
  98. package/patternfly-docs/generated/components/menus/select/react-templates.js +257 -0
  99. package/patternfly-docs/generated/components/menus/select/react.js +998 -0
  100. package/patternfly-docs/generated/components/modal/react-deprecated.js +554 -0
  101. package/patternfly-docs/generated/components/modal/react.js +597 -0
  102. package/patternfly-docs/generated/components/navigation/react-demos.js +356 -0
  103. package/patternfly-docs/generated/components/navigation/react.js +409 -0
  104. package/patternfly-docs/generated/components/notification-badge/react.js +196 -0
  105. package/patternfly-docs/generated/components/notification-drawer/react-demos.js +107 -0
  106. package/patternfly-docs/generated/components/notification-drawer/react.js +394 -0
  107. package/patternfly-docs/generated/components/number-input/react.js +210 -0
  108. package/patternfly-docs/generated/components/overflow-menu/react.js +274 -0
  109. package/patternfly-docs/generated/components/page/react-demos.js +149 -0
  110. package/patternfly-docs/generated/components/page/react.js +1352 -0
  111. package/patternfly-docs/generated/components/pagination/react.js +492 -0
  112. package/patternfly-docs/generated/components/panel/react.js +236 -0
  113. package/patternfly-docs/generated/components/popover/react.js +390 -0
  114. package/patternfly-docs/generated/components/progress/react-demos.js +59 -0
  115. package/patternfly-docs/generated/components/progress/react.js +283 -0
  116. package/patternfly-docs/generated/components/progress-stepper/react-demos.js +45 -0
  117. package/patternfly-docs/generated/components/progress-stepper/react.js +219 -0
  118. package/patternfly-docs/generated/components/search-input/react-demos.js +113 -0
  119. package/patternfly-docs/generated/components/search-input/react.js +263 -0
  120. package/patternfly-docs/generated/components/sidebar/react.js +236 -0
  121. package/patternfly-docs/generated/components/simple-list/react.js +200 -0
  122. package/patternfly-docs/generated/components/skeleton/react-demos.js +44 -0
  123. package/patternfly-docs/generated/components/skeleton/react.js +122 -0
  124. package/patternfly-docs/generated/components/skip-to-content/react.js +73 -0
  125. package/patternfly-docs/generated/components/slider/react.js +309 -0
  126. package/patternfly-docs/generated/components/spinner/react.js +111 -0
  127. package/patternfly-docs/generated/components/switch/react.js +163 -0
  128. package/patternfly-docs/generated/components/table/react-demos.js +355 -0
  129. package/patternfly-docs/generated/components/table/react-deprecated.js +1350 -0
  130. package/patternfly-docs/generated/components/table/react.js +3241 -0
  131. package/patternfly-docs/generated/components/tabs/react-demos.js +108 -0
  132. package/patternfly-docs/generated/components/tabs/react.js +1359 -0
  133. package/patternfly-docs/generated/components/text-input-group/react-demos.js +152 -0
  134. package/patternfly-docs/generated/components/text-input-group/react.js +278 -0
  135. package/patternfly-docs/generated/components/tile/react-deprecated.js +242 -0
  136. package/patternfly-docs/generated/components/timestamp/react.js +283 -0
  137. package/patternfly-docs/generated/components/title/react.js +94 -0
  138. package/patternfly-docs/generated/components/toggle-group/react.js +299 -0
  139. package/patternfly-docs/generated/components/toolbar/react-demos.js +66 -0
  140. package/patternfly-docs/generated/components/toolbar/react.js +932 -0
  141. package/patternfly-docs/generated/components/tooltip/react.js +241 -0
  142. package/patternfly-docs/generated/components/tree-view/react.js +429 -0
  143. package/patternfly-docs/generated/components/truncate/react.js +211 -0
  144. package/patternfly-docs/generated/components/wizard/react-demos.js +87 -0
  145. package/patternfly-docs/generated/components/wizard/react-deprecated.js +788 -0
  146. package/patternfly-docs/generated/components/wizard/react.js +986 -0
  147. package/patternfly-docs/generated/developer-guides/open-ui-automation/react.js +285 -0
  148. package/patternfly-docs/generated/foundations-and-styles/layouts/bullseye/react.js +70 -0
  149. package/patternfly-docs/generated/foundations-and-styles/layouts/flex/react.js +506 -0
  150. package/patternfly-docs/generated/foundations-and-styles/layouts/gallery/react.js +94 -0
  151. package/patternfly-docs/generated/foundations-and-styles/layouts/grid/react.js +272 -0
  152. package/patternfly-docs/generated/foundations-and-styles/layouts/level/react.js +87 -0
  153. package/patternfly-docs/generated/foundations-and-styles/layouts/split/react.js +124 -0
  154. package/patternfly-docs/generated/foundations-and-styles/layouts/stack/react.js +112 -0
  155. package/patternfly-docs/generated/index.js +1769 -0
  156. package/patternfly-docs/generated/patterns/card-view/react-demos.js +78 -0
  157. package/patternfly-docs/generated/patterns/filters/react-demos.js +141 -0
  158. package/patternfly-docs/generated/patterns/password-generator/react-demos.js +51 -0
  159. package/patternfly-docs/generated/patterns/password-strength/react-demos.js +61 -0
  160. package/patternfly-docs/generated/patterns/primary-detail/react-demos.js +124 -0
  161. package/patternfly-docs/generated/patterns/right-to-left/react-demos.js +81 -0
  162. package/LICENSE +0 -21
@@ -0,0 +1,3230 @@
1
+ import React from 'react';
2
+ import { AutoLinkHeader, Example, Link as PatternflyThemeLink } from '@patternfly/documentation-framework/components';
3
+ import { cloneElement, useEffect, useRef, useState } from 'react';
4
+ import {
5
+ Chart,
6
+ ChartArea,
7
+ ChartAxis,
8
+ ChartBar,
9
+ ChartBullet,
10
+ ChartContainer,
11
+ ChartDonut,
12
+ ChartGroup,
13
+ ChartLabel,
14
+ ChartLegend,
15
+ ChartLegendTooltip,
16
+ ChartLine,
17
+ ChartPie,
18
+ ChartScatter,
19
+ ChartThemeColor,
20
+ ChartVoronoiContainer,
21
+ createContainer,
22
+ getInteractiveLegendEvents,
23
+ getInteractiveLegendItemStyles
24
+ } from '@patternfly/react-charts/victory';
25
+ import { getResizeObserver } from '@patternfly/react-core';
26
+ import chart_color_black_500 from '@patternfly/react-tokens/dist/esm/chart_color_black_500';
27
+ import '@patternfly/patternfly/patternfly-charts.css';
28
+ const pageData = {
29
+ "id": "Legends",
30
+ "section": "components",
31
+ "subsection": "charts",
32
+ "deprecated": false,
33
+ "template": false,
34
+ "beta": false,
35
+ "demo": false,
36
+ "newImplementationLink": false,
37
+ "source": "-Victory",
38
+ "tabName": null,
39
+ "slug": "/components/charts/legends/-Victory",
40
+ "sourceLink": "https://github.com/patternfly/patternfly-org/blob/main/packages/react-charts/src/victory/components/ChartLegend/examples/ChartLegend.md",
41
+ "relPath": "packages/react-charts/src/victory/components/ChartLegend/examples/ChartLegend.md",
42
+ "propComponents": [
43
+ {
44
+ "name": "Chart",
45
+ "description": "Chart is a wrapper component that reconciles the domain for all its children, controls the layout of the chart,\nand coordinates animations and shared events.\n\nSee https://github.com/FormidableLabs/victory/blob/main/packages/victory-chart/src/victory-chart.tsx",
46
+ "props": [
47
+ {
48
+ "name": "animate",
49
+ "type": "boolean | object",
50
+ "description": "The animate prop specifies props for VictoryAnimation to use.\nThe animate prop should also be used to specify enter and exit\ntransition configurations with the `onExit` and `onEnter` namespaces respectively.\n\n\n@example {duration: 500, onExit: () => {}, onEnter: {duration: 500, before: () => ({y: 0})})}"
51
+ },
52
+ {
53
+ "name": "ariaDesc",
54
+ "type": "string",
55
+ "description": "The ariaDesc prop specifies the description of the chart/SVG to assist with\naccessibility for screen readers.\n\nNote: Overridden by the desc prop of containerComponent"
56
+ },
57
+ {
58
+ "name": "ariaTitle",
59
+ "type": "string",
60
+ "description": "The ariaTitle prop specifies the title to be applied to the SVG to assist\naccessibility for screen readers.\n\nNote: Overridden by the title prop of containerComponent"
61
+ },
62
+ {
63
+ "name": "backgroundComponent",
64
+ "type": "React.ReactElement<any>",
65
+ "description": "The backgroundComponent prop takes a component instance which will be responsible for rendering a background if the\nChart's style component includes background styles. The new element created from the passed backgroundComponent\nwill be provided with the following properties calculated by Chart: height, polar, scale, style, x, y, width.\nAll of these props on Background should take precedence over what VictoryChart is trying to set."
66
+ },
67
+ {
68
+ "name": "children",
69
+ "type": "React.ReactNode | React.ReactNode[]",
70
+ "description": "The children to render with the chart"
71
+ },
72
+ {
73
+ "name": "containerComponent",
74
+ "type": "React.ReactElement<any>",
75
+ "description": "The containerComponent prop takes an entire component which will be used to\ncreate a container element for standalone charts.\nThe new element created from the passed containerComponent wil be provided with\nthese props from ChartArea: height, width, children\n(the chart itself) and style. Props that are not provided by the\nchild chart component include title and desc, both of which\nare intended to add accessibility to Victory components. The more descriptive these props\nare, the more accessible your data will be for people using screen readers.\nAny of these props may be overridden by passing in props to the supplied component,\nor modified or ignored within the custom component itself. If a dataComponent is\nnot provided, ChartArea will use the default ChartContainer component.\n\n@example <ChartContainer title=\"Chart of Dog Breeds\" desc=\"This chart shows ...\" />",
76
+ "defaultValue": "<ChartContainer />"
77
+ },
78
+ {
79
+ "name": "domain",
80
+ "type": "number[] | { x: number[], y: number[] }",
81
+ "description": "The domain prop describes the range of values your chart will include. This prop can be\ngiven as a array of the minimum and maximum expected values for your chart,\nor as an object that specifies separate arrays for x and y.\nIf this prop is not provided, a domain will be calculated from data, or other\navailable information.\n\n\n@example [low, high], { x: [low, high], y: [low, high] }\n\n[-1, 1], {x: [0, 100], y: [0, 1]}"
82
+ },
83
+ {
84
+ "name": "domainPadding",
85
+ "type": "number | number[] | { x: number[], y: number[] }",
86
+ "description": "The domainPadding prop specifies a number of pixels of padding to add to the\nbeginning and end of a domain. This prop is useful for explicitly spacing ticks farther\nfrom the origin to prevent crowding. This prop should be given as an object with\nnumbers specified for x and y.\n\n\n@example [left, right], { x: [left, right], y: [bottom, top] }\n\n{x: [10, -10], y: 5}"
87
+ },
88
+ {
89
+ "name": "endAngle",
90
+ "type": "number",
91
+ "description": "The endAngle props defines the overall end angle of a polar chart in degrees. This prop is used in conjunction with\nstartAngle to create polar chart that spans only a segment of a circle, or to change overall rotation of the chart.\nThis prop should be given as a number of degrees. Degrees are defined as starting at the 3 o'clock position, and\nproceeding counterclockwise."
92
+ },
93
+ {
94
+ "name": "eventKey",
95
+ "type": "number | string | Function",
96
+ "description": "Similar to data accessor props `x` and `y`, this prop may be used to functionally\nassign eventKeys to data"
97
+ },
98
+ {
99
+ "name": "events",
100
+ "type": "object[]",
101
+ "description": "The event prop takes an array of event objects. Event objects are composed of\na target, an eventKey, and eventHandlers. Targets may be any valid style namespace\nfor a given component, so \"data\" and \"labels\" are all valid targets for ChartPie\nevents. The eventKey may optionally be used to select a single element by index rather than\nan entire set. The eventHandlers object should be given as an object whose keys are standard\nevent names (i.e. onClick) and whose values are event callbacks. The return value\nof an event handler is used to modify elements. The return value should be given\nas an object or an array of objects with optional target and eventKey keys,\nand a mutation key whose value is a function. The target and eventKey keys\nwill default to those corresponding to the element the event handler was attached to.\nThe mutation function will be called with the calculated props for the individual selected\nelement (i.e. a single bar), and the object returned from the mutation function\nwill override the props of the selected element via object assignment.\n\n\n@example\nevents={[\n {\n target: \"data\",\n eventKey: 1,\n eventHandlers: {\n onClick: () => {\n return [\n {\n eventKey: 2,\n mutation: (props) => {\n return {style: merge({}, props.style, {fill: \"orange\"})};\n }\n }, {\n eventKey: 2,\n target: \"labels\",\n mutation: () => {\n return {text: \"hey\"};\n }\n }\n ];\n }\n }\n }\n]}"
102
+ },
103
+ {
104
+ "name": "externalEventMutations",
105
+ "type": "object[]",
106
+ "description": "Chart uses the standard externalEventMutations prop."
107
+ },
108
+ {
109
+ "name": "groupComponent",
110
+ "type": "React.ReactElement<any>",
111
+ "description": "The groupComponent prop takes an entire component which will be used to\ncreate group elements for use within container elements. This prop defaults\nto a <g> tag on web, and a react-native-svg <G> tag on mobile"
112
+ },
113
+ {
114
+ "name": "hasPatterns",
115
+ "type": "boolean | boolean[]",
116
+ "description": "The hasPatterns prop is an optional prop that indicates whether a pattern is shown for a chart.\nSVG patterns are dynamically generated (unique to each chart) in order to apply colors from the selected\ncolor theme or custom color scale. Those generated patterns are applied in a specific order (via a URL), similar\nto the color theme ordering defined by PatternFly. If the multi-color theme was in use; for example, colorized\npatterns would be displayed in that same order. Create custom patterns via the patternScale prop.\n\nNote: Not all components are supported; for example, ChartLine, ChartBullet, ChartThreshold, etc.\n\n@example hasPatterns={ true }\n@example hasPatterns={[ true, true, false ]}"
117
+ },
118
+ {
119
+ "name": "height",
120
+ "type": "number",
121
+ "description": "Specifies the height the svg viewBox of the chart container. This value should be given as a\nnumber of pixels.\n\nBecause Victory renders responsive containers, the width and height props do not determine the width and\nheight of the chart in number of pixels, but instead define an aspect ratio for the chart. The exact number of\npixels will depend on the size of the container the chart is rendered into. Typically, the parent container is set\nto the same width in order to maintain the aspect ratio.",
122
+ "defaultValue": "theme.chart.height"
123
+ },
124
+ {
125
+ "name": "horizontal",
126
+ "type": "boolean",
127
+ "description": "The horizontal prop determines whether data will be plotted horizontally. When this prop is set to true, the\nindependent variable will be plotted on the y axis and the dependent variable will be plotted on the x axis."
128
+ },
129
+ {
130
+ "name": "innerRadius",
131
+ "type": "number | Function",
132
+ "description": "When the innerRadius prop is set, polar charts will be hollow rather than circular."
133
+ },
134
+ {
135
+ "name": "legendAllowWrap",
136
+ "type": "boolean | ((extraHeight: number) => void)",
137
+ "description": "Allows legend items to wrap onto the next line if the chart is not wide enough.\n\nNote that the chart's SVG height and width are 100% by default, so it can be responsive itself. However, if you\ndefine the height and width of the chart's parent container, you must accommodate for extra legend height due to\nlegend items wrapping onto the next line. When the height of the chart's parent container is too small, some legend\nitems may not be visible.\n\nAlternatively, a callback function may be provided, which will be called after the legend's itemsPerRow property\nhas been calculated. The value provided can be used to increase the chart's parent container height as legend\nitems wrap onto the next line. If no adjustment is necessary, the value will be zero.\n\nNote: This is overridden by the legendItemsPerRow property"
138
+ },
139
+ {
140
+ "name": "legendComponent",
141
+ "type": "React.ReactElement<any>",
142
+ "description": "The legend component to render with chart.\n\nNote: Use legendData so the legend width can be calculated and positioned properly.\nDefault legend properties may be applied",
143
+ "defaultValue": "<ChartLegend />"
144
+ },
145
+ {
146
+ "name": "legendData",
147
+ "type": "{\n name?: string;\n symbol?: {\n fill?: string;\n type?: string;\n };\n}[]",
148
+ "description": "Specify data via the data prop. ChartLegend expects data as an\narray of objects with name (required), symbol, and labels properties.\nThe data prop must be given as an array.\n\n@example legendData={[{ name: `GBps capacity - 45%` }, { name: 'Unused' }]}"
149
+ },
150
+ {
151
+ "name": "legendDirection",
152
+ "type": "'ltr' | 'rtl'",
153
+ "description": "Text direction of the legend labels.",
154
+ "defaultValue": "'ltr'"
155
+ },
156
+ {
157
+ "name": "legendOrientation",
158
+ "type": "'horizontal' | 'vertical'",
159
+ "description": "The orientation prop takes a string that defines whether legend data\nare displayed in a row or column. When orientation is \"horizontal\",\nlegend items will be displayed in a single row. When orientation is\n\"vertical\", legend items will be displayed in a single column. Line\nand text-wrapping is not currently supported, so \"vertical\"\norientation is both the default setting and recommended for\ndisplaying many series of data.",
160
+ "defaultValue": "theme.legend.orientation"
161
+ },
162
+ {
163
+ "name": "legendPosition",
164
+ "type": "'bottom' | 'bottom-left' | 'right'",
165
+ "description": "The legend position relation to the chart. Valid values are 'bottom', 'bottom-left', and 'right'\n\nNote: When adding a legend, padding may need to be adjusted in order to accommodate the extra legend. In some\ncases, the legend may not be visible until enough padding is applied.",
166
+ "defaultValue": "\"right\""
167
+ },
168
+ {
169
+ "name": "maxDomain",
170
+ "type": "number | { x?: number; y?: number }",
171
+ "description": "The maxDomain prop defines a maximum domain value for a chart. This prop is useful in situations where the maximum\ndomain of a chart is static, while the minimum value depends on data or other variable information. If the domain\nprop is set in addition to maximumDomain, domain will be used.\n\nNote: The x value supplied to the maxDomain prop refers to the independent variable, and the y value refers to the\ndependent variable. This may cause confusion in horizontal charts, as the independent variable will corresponds to\nthe y axis.\n\n@example\n\nmaxDomain={0}\nmaxDomain={{ y: 0 }}"
172
+ },
173
+ {
174
+ "name": "minDomain",
175
+ "type": "number | { x?: number; y?: number }",
176
+ "description": "The minDomain prop defines a minimum domain value for a chart. This prop is useful in situations where the minimum\ndomain of a chart is static, while the maximum value depends on data or other variable information. If the domain\nprop is set in addition to minimumDomain, domain will be used.\n\nNote: The x value supplied to the minDomain prop refers to the independent variable, and the y value refers to the\ndependent variable. This may cause confusion in horizontal charts, as the independent variable will corresponds to\nthe y axis.\n\n@example\n\nminDomain={0}\nminDomain={{ y: 0 }}"
177
+ },
178
+ {
179
+ "name": "name",
180
+ "type": "string",
181
+ "description": "The name prop is typically used to reference a component instance when defining shared events. However, this\noptional prop may also be applied to child elements as an ID prefix. This is a workaround to ensure Victory\nbased components output unique IDs when multiple charts appear in a page."
182
+ },
183
+ {
184
+ "name": "padding",
185
+ "type": "number | { top: number, bottom: number, left: number, right: number }",
186
+ "description": "The padding props specifies the amount of padding in number of pixels between\nthe edge of the chart and any rendered child components. This prop can be given\nas a number or as an object with padding specified for top, bottom, left\nand right."
187
+ },
188
+ {
189
+ "name": "patternScale",
190
+ "type": "string[]",
191
+ "description": "The patternScale prop is an optional prop that defines patterns to apply, where applicable. This prop should be\ngiven as a string array of pattern URLs. Patterns will be assigned to children by index and will repeat when there\nare more children than patterns in the provided patternScale. Use null to omit the pattern for a given index.\n\nNote: Not all components are supported; for example, ChartLine, ChartBullet, ChartThreshold, etc.\n\n@example patternScale={[ 'url(\"#pattern1\")', 'url(\"#pattern2\")', null ]}"
192
+ },
193
+ {
194
+ "name": "polar",
195
+ "type": "boolean",
196
+ "description": "Victory components can pass a boolean polar prop to specify whether a label is part of a polar chart."
197
+ },
198
+ {
199
+ "name": "range",
200
+ "type": "number[] | { x: number[], y: number[] }",
201
+ "description": "The range prop describes the dimensions over which data may be plotted. For cartesian coordinate systems, this\ncorresponds to minimum and maximum svg coordinates in the x and y dimension. In polar coordinate systems this\ncorresponds to a range of angles and radii. When this value is not given it will be calculated from the width,\nheight, and padding, or from the startAngle and endAngle in the case of polar charts. All components in a given\nchart must share the same range, so setting this prop on children nested within Chart, ChartStack, or\nChartGroup will have no effect. This prop is usually not set manually.\n\n\n@example [low, high] | { x: [low, high], y: [low, high] }\n\nCartesian: range={{ x: [50, 250], y: [50, 250] }}\nPolar: range={{ x: [0, 360], y: [0, 250] }}"
202
+ },
203
+ {
204
+ "name": "scale",
205
+ "type": "string | { x: string, y: string }",
206
+ "description": "The scale prop determines which scales your chart should use. This prop can be\ngiven as a string specifying a supported scale (\"linear\", \"time\", \"log\", \"sqrt\"),\nas a d3 scale function, or as an object with scales specified for x and y\n\n\n@example d3Scale.time(), {x: \"linear\", y: \"log\"}"
207
+ },
208
+ {
209
+ "name": "showAxis",
210
+ "type": "boolean",
211
+ "description": "Convenience prop to hide both x and y axis, which are shown by default. Alternatively, the axis can be hidden via\nchart styles.",
212
+ "defaultValue": "true"
213
+ },
214
+ {
215
+ "name": "singleQuadrantDomainPadding",
216
+ "type": "boolean | { x?: boolean; y?: boolean }",
217
+ "description": "By default domainPadding is coerced to existing quadrants. This means that if a given domain only includes positive\nvalues, no amount of padding applied by domainPadding will result in a domain with negative values. This is the\ndesired behavior in most cases. For users that need to apply padding without regard to quadrant, the\nsingleQuadrantDomainPadding prop may be used. This prop may be given as a boolean or an object with boolean values\nspecified for \"x\" and/or \"y\". When this prop is false (or false for a given dimension), padding will be applied\nwithout regard to quadrant. If this prop is not specified, domainPadding will be coerced to existing quadrants.\n\nNote: The x value supplied to the singleQuadrantDomainPadding prop refers to the independent variable, and the y\nvalue refers to the dependent variable. This may cause confusion in horizontal charts, as the independent variable\nwill corresponds to the y axis.\n\n@example\n\nsingleQuadrantDomainPadding={false}\nsingleQuadrantDomainPadding={{ x: false }}"
218
+ },
219
+ {
220
+ "name": "standalone",
221
+ "type": "boolean",
222
+ "description": "The standalone prop determines whether the component will render a standalone svg\nor a <g> tag that will be included in an external svg. Set standalone to false to\ncompose Chart with other components within an enclosing <svg> tag."
223
+ },
224
+ {
225
+ "name": "startAngle",
226
+ "type": "number",
227
+ "description": "The startAngle props defines the overall start angle of a polar chart in degrees. This prop is used in conjunction\nwith endAngle to create polar chart that spans only a segment of a circle, or to change overall rotation of the\nchart. This prop should be given as a number of degrees. Degrees are defined as starting at the 3 o'clock position,\nand proceeding counterclockwise."
228
+ },
229
+ {
230
+ "name": "style",
231
+ "type": "{ parent: object, background: object }",
232
+ "description": "The style prop defines the style of the component. The style prop should be given as an object with styles defined\nfor data, labels and parent. Any valid svg styles are supported, but width, height, and padding should be specified\nvia props as they determine relative layout for components in Chart.\n\n\n@propType { parent: object, background: object }"
233
+ },
234
+ {
235
+ "name": "theme",
236
+ "type": "object",
237
+ "description": "The theme prop specifies a theme to use for determining styles and layout properties for a component. Any styles or\nprops defined in theme may be overwritten by props specified on the component instance.",
238
+ "defaultValue": "getChartTheme(themeColor, showAxis)"
239
+ },
240
+ {
241
+ "name": "themeColor",
242
+ "type": "string",
243
+ "description": "Specifies the theme color. Valid values are 'blue', 'green', 'multi', etc.\n\nNote: Not compatible with theme prop\n\n@example themeColor={ChartThemeColor.blue}"
244
+ },
245
+ {
246
+ "name": "width",
247
+ "type": "number",
248
+ "description": "Specifies the width of the svg viewBox of the chart container. This value should be given as a\nnumber of pixels.\n\nBecause Victory renders responsive containers, the width and height props do not determine the width and\nheight of the chart in number of pixels, but instead define an aspect ratio for the chart. The exact number of\npixels will depend on the size of the container the chart is rendered into. Typically, the parent container is set\nto the same width in order to maintain the aspect ratio.",
249
+ "defaultValue": "theme.chart.width"
250
+ }
251
+ ]
252
+ },
253
+ {
254
+ "name": "ChartArea",
255
+ "description": "ChartArea renders a dataset as a single area path. Since ChartArea renders only a single element to represent a\ndataset rather than individual elements for each data point, some of its behavior is different from other Victory\nbased components. Pay special attention to style and events props, and take advantage of ChartVoronoiContainer to\nenable tooltips. ChartArea can be composed with Chart to create area charts.\n\nSee https://github.com/FormidableLabs/victory/blob/main/packages/victory-area/src/victory-area.tsx",
256
+ "props": [
257
+ {
258
+ "name": "animate",
259
+ "type": "boolean | object",
260
+ "description": "The animate prop specifies props for VictoryAnimation to use.\nThe animate prop should also be used to specify enter and exit\ntransition configurations with the `onExit` and `onEnter` namespaces respectively.\n\n\n@example {duration: 500, onExit: () => {}, onEnter: {duration: 500, before: () => ({y: 0})})}"
261
+ },
262
+ {
263
+ "name": "categories",
264
+ "type": "string[] | { x: string[], y: string[] }",
265
+ "description": "The categories prop specifies how categorical data for a chart should be ordered.\nThis prop should be given as an array of string values, or an object with\nthese arrays of values specified for x and y. If this prop is not set,\ncategorical data will be plotted in the order it was given in the data array\n\n\n@example [\"dogs\", \"cats\", \"mice\"]"
266
+ },
267
+ {
268
+ "name": "containerComponent",
269
+ "type": "React.ReactElement<any>",
270
+ "description": "The containerComponent prop takes an entire component which will be used to\ncreate a container element for standalone charts.\nThe new element created from the passed containerComponent wil be provided with\nthese props from ChartArea: height, width, children\n(the chart itself) and style. Props that are not provided by the\nchild chart component include title and desc, both of which\nare intended to add accessibility to Victory components. The more descriptive these props\nare, the more accessible your data will be for people using screen readers.\nAny of these props may be overridden by passing in props to the supplied component,\nor modified or ignored within the custom component itself. If a dataComponent is\nnot provided, ChartArea will use the default ChartContainer component.\n\n@example <ChartContainer title=\"Chart of Dog Breeds\" desc=\"This chart shows...\" />",
271
+ "defaultValue": "<ChartContainer />"
272
+ },
273
+ {
274
+ "name": "data",
275
+ "type": "any[]",
276
+ "description": "The data prop specifies the data to be plotted. Data should be in the form of an array\nof data points, or an array of arrays of data points for multiple datasets.\nEach data point may be any format you wish (depending on the `x` and `y` accessor props),\nbut by default, an object with x and y properties is expected.\n\n@example\n\n[{x: 1, y: 2}, {x: 2, y: 3}], [[1, 2], [2, 3]],\n[[{x: \"a\", y: 1}, {x: \"b\", y: 2}], [{x: \"a\", y: 2}, {x: \"b\", y: 3}]]"
277
+ },
278
+ {
279
+ "name": "dataComponent",
280
+ "type": "React.ReactElement<any>",
281
+ "description": "The dataComponent prop takes an entire component which will be used to create an area.\nThe new element created from the passed dataComponent will be provided with the\nfollowing properties calculated by ChartArea: a scale, style, events, interpolation,\nand an array of modified data objects (including x, y, and calculated y0 and y1).\nAny of these props may be overridden by passing in props to the supplied component,\nor modified or ignored within the custom component itself. If a dataComponent is\nnot provided, ChartArea will use its default Area component."
282
+ },
283
+ {
284
+ "name": "domain",
285
+ "type": "number[] | { x: number[], y: number[] }",
286
+ "description": "The domain prop describes the range of values your chart will cover. This prop can be\ngiven as a array of the minimum and maximum expected values for your bar chart,\nor as an object that specifies separate arrays for x and y.\nIf this prop is not provided, a domain will be calculated from data, or other\navailable information.\n\n\n@example [low, high], { x: [low, high], y: [low, high] }\n\n[-1, 1], {x: [0, 100], y: [0, 1]}"
287
+ },
288
+ {
289
+ "name": "domainPadding",
290
+ "type": "number | number[] | { x: number[], y: number[] }",
291
+ "description": "The domainPadding prop specifies a number of pixels of padding to add to the\nbeginning and end of a domain. This prop is useful for explicitly spacing ticks farther\nfrom the origin to prevent crowding. This prop should be given as an object with\nnumbers specified for x and y.\n\n\n@example [left, right], { x: [left, right], y: [bottom, top] }\n\n{x: [10, -10], y: 5}"
292
+ },
293
+ {
294
+ "name": "eventKey",
295
+ "type": "number | string | Function | string[] | number[]",
296
+ "description": "Similar to data accessor props `x` and `y`, this prop may be used to functionally\nassign eventKeys to data"
297
+ },
298
+ {
299
+ "name": "events",
300
+ "type": "object[]",
301
+ "description": "The event prop take an array of event objects. Event objects are composed of\na target, an eventKey, and eventHandlers. Targets may be any valid style namespace\nfor a given component, so \"data\" and \"labels\" are all valid targets for ChartArea events.\nSince ChartArea only renders a single element, the eventKey property is not used.\nThe eventHandlers object should be given as an object whose keys are standard\nevent names (i.e. onClick) and whose values are event callbacks. The return value\nof an event handler is used to modify elements. The return value should be given\nas an object or an array of objects with optional target and eventKey keys,\nand a mutation key whose value is a function. The target and eventKey keys\nwill default to those corresponding to the element the event handler was attached to.\nThe mutation function will be called with the calculated props for the individual selected\nelement (i.e. an area), and the object returned from the mutation function\nwill override the props of the selected element via object assignment.\n\n\n@example\nevents={[\n {\n target: \"data\",\n eventHandlers: {\n onClick: () => {\n return [\n {\n mutation: (props) => {\n return {style: merge({}, props.style, {fill: \"orange\"})};\n }\n }, {\n target: \"labels\",\n mutation: () => {\n return {text: \"hey\"};\n }\n }\n ];\n }\n }\n }\n]}"
302
+ },
303
+ {
304
+ "name": "externalEventMutations",
305
+ "type": "object[]",
306
+ "description": "ChartArea uses the standard externalEventMutations prop."
307
+ },
308
+ {
309
+ "name": "groupComponent",
310
+ "type": "React.ReactElement<any>",
311
+ "description": "The groupComponent prop takes an entire component which will be used to\ncreate group elements for use within container elements. This prop defaults\nto a <g> tag on web, and a react-native-svg <G> tag on mobile"
312
+ },
313
+ {
314
+ "name": "height",
315
+ "type": "number",
316
+ "description": "The height props specifies the height the svg viewBox of the chart container.\nThis value should be given as a number of pixels"
317
+ },
318
+ {
319
+ "name": "horizontal",
320
+ "type": "boolean",
321
+ "description": "The horizontal prop determines whether data will be plotted horizontally.\nWhen this prop is set to true, the independent variable will be plotted on the y axis\nand the dependent variable will be plotted on the x axis."
322
+ },
323
+ {
324
+ "name": "interpolation",
325
+ "type": "string | Function",
326
+ "description": "The interpolation prop determines how data points should be connected when plotting a line.\nPolar area charts may use the following interpolation options: \"basis\", \"cardinal\", \"catmullRom\", \"linear\".\nCartesian area charts may use the following interpolation options: \"basis\", \"cardinal\", \"catmullRom\", \"linear\",\n\"monotoneX\", \"monotoneY\", \"natural\", \"step\", \"stepAfter\", \"stepBefore\"."
327
+ },
328
+ {
329
+ "name": "labelComponent",
330
+ "type": "React.ReactElement<any>",
331
+ "description": "The labelComponent prop takes in an entire label component which will be used\nto create a label for the area. The new element created from the passed labelComponent\nwill be supplied with the following properties: x, y, index, data, verticalAnchor,\ntextAnchor, angle, style, text, and events. any of these props may be overridden\nby passing in props to the supplied component, or modified or ignored within\nthe custom component itself. If labelComponent is omitted, a new ChartLabel\nwill be created with props described above. This labelComponent prop should be used to\nprovide a series label for ChartArea. If individual labels are required for each\ndata point, they should be created by composing ChartArea with VictoryScatter"
332
+ },
333
+ {
334
+ "name": "labels",
335
+ "type": "string[] | number[] | ((data: any) => string | number | null)",
336
+ "description": "The labels prop defines labels that will appear above each bar in your chart.\nThis prop should be given as an array of values or as a function of data.\nIf given as an array, the number of elements in the array should be equal to\nthe length of the data array. Labels may also be added directly to the data object\nlike data={[{x: 1, y: 1, label: \"first\"}]}.\n\n@example [\"spring\", \"summer\", \"fall\", \"winter\"], (datum) => datum.title"
337
+ },
338
+ {
339
+ "name": "maxDomain",
340
+ "type": "number | { x?: number; y?: number }",
341
+ "description": "The maxDomain prop defines a maximum domain value for a chart. This prop is useful in situations where the maximum\ndomain of a chart is static, while the minimum value depends on data or other variable information. If the domain\nprop is set in addition to maximumDomain, domain will be used.\n\nNote: The x value supplied to the maxDomain prop refers to the independent variable, and the y value refers to the\ndependent variable. This may cause confusion in horizontal charts, as the independent variable will corresponds to\nthe y axis.\n\n@example\n\nmaxDomain={0}\nmaxDomain={{ y: 0 }}"
342
+ },
343
+ {
344
+ "name": "minDomain",
345
+ "type": "number | { x?: number; y?: number }",
346
+ "description": "The minDomain prop defines a minimum domain value for a chart. This prop is useful in situations where the minimum\ndomain of a chart is static, while the maximum value depends on data or other variable information. If the domain\nprop is set in addition to minimumDomain, domain will be used.\n\nNote: The x value supplied to the minDomain prop refers to the independent variable, and the y value refers to the\ndependent variable. This may cause confusion in horizontal charts, as the independent variable will corresponds to\nthe y axis.\n\n@example\n\nminDomain={0}\nminDomain={{ y: 0 }}"
347
+ },
348
+ {
349
+ "name": "name",
350
+ "type": "string",
351
+ "description": "The name prop is used to reference a component instance when defining shared events."
352
+ },
353
+ {
354
+ "name": "origin",
355
+ "type": "{ x: number, y: number }",
356
+ "description": "Victory components will pass an origin prop is to define the center point in svg coordinates for polar charts.\n\nNote: It will not typically be necessary to set an origin prop manually"
357
+ },
358
+ {
359
+ "name": "padding",
360
+ "type": "number | { top: number, bottom: number, left: number, right: number }",
361
+ "description": "The padding props specifies the amount of padding in number of pixels between\nthe edge of the chart and any rendered child components. This prop can be given\nas a number or as an object with padding specified for top, bottom, left\nand right."
362
+ },
363
+ {
364
+ "name": "polar",
365
+ "type": "boolean",
366
+ "description": "Victory components can pass a boolean polar prop to specify whether a label is part of a polar chart."
367
+ },
368
+ {
369
+ "name": "range",
370
+ "type": "number[] | { x: number[], y: number[] }",
371
+ "description": "The range prop describes the dimensions over which data may be plotted. For cartesian coordinate systems, this\ncorresponds to minimum and maximum svg coordinates in the x and y dimension. In polar coordinate systems this\ncorresponds to a range of angles and radii. When this value is not given it will be calculated from the width,\nheight, and padding, or from the startAngle and endAngle in the case of polar charts. All components in a given\nchart must share the same range, so setting this prop on children nested within Chart or\nChartGroup will have no effect. This prop is usually not set manually.\n\n\n@example [low, high] | { x: [low, high], y: [low, high] }\n\nCartesian: range={{ x: [50, 250], y: [50, 250] }}\nPolar: range={{ x: [0, 360], y: [0, 250] }}"
372
+ },
373
+ {
374
+ "name": "samples",
375
+ "type": "number",
376
+ "description": "The samples prop specifies how many individual points to plot when plotting\ny as a function of x. Samples is ignored if x props are provided instead."
377
+ },
378
+ {
379
+ "name": "scale",
380
+ "type": "string | { x: string, y: string }",
381
+ "description": "The scale prop determines which scales your chart should use. This prop can be\ngiven as a string specifying a supported scale (\"linear\", \"time\", \"log\", \"sqrt\"),\nas a d3 scale function, or as an object with scales specified for x and y\n\n\n@example d3Scale.time(), {x: \"linear\", y: \"log\"}"
382
+ },
383
+ {
384
+ "name": "singleQuadrantDomainPadding",
385
+ "type": "boolean | { x?: boolean; y?: boolean }",
386
+ "description": "By default domainPadding is coerced to existing quadrants. This means that if a given domain only includes positive\nvalues, no amount of padding applied by domainPadding will result in a domain with negative values. This is the\ndesired behavior in most cases. For users that need to apply padding without regard to quadrant, the\nsingleQuadrantDomainPadding prop may be used. This prop may be given as a boolean or an object with boolean values\nspecified for \"x\" and/or \"y\". When this prop is false (or false for a given dimension), padding will be applied\nwithout regard to quadrant. If this prop is not specified, domainPadding will be coerced to existing quadrants.\n\nNote: The x value supplied to the singleQuadrantDomainPadding prop refers to the independent variable, and the y\nvalue refers to the dependent variable. This may cause confusion in horizontal charts, as the independent variable\nwill corresponds to the y axis.\n\n@example\n\nsingleQuadrantDomainPadding={false}\nsingleQuadrantDomainPadding={{ x: false }}"
387
+ },
388
+ {
389
+ "name": "sortKey",
390
+ "type": "number | string | Function | string[]",
391
+ "description": "Use the sortKey prop to indicate how data should be sorted. This prop\nis given directly to the lodash sortBy function to be executed on the\nfinal dataset."
392
+ },
393
+ {
394
+ "name": "sortOrder",
395
+ "type": "string",
396
+ "description": "The sortOrder prop specifies whether sorted data should be returned in 'ascending' or 'descending' order."
397
+ },
398
+ {
399
+ "name": "standalone",
400
+ "type": "boolean",
401
+ "description": "The standalone prop determines whether the component will render a standalone svg\nor a <g> tag that will be included in an external svg. Set standalone to false to\ncompose ChartArea with other components within an enclosing <svg> tag."
402
+ },
403
+ {
404
+ "name": "style",
405
+ "type": "{ parent: object, data: object, labels: object }",
406
+ "description": "The style prop specifies styles for your ChartArea. Any valid inline style properties\nwill be applied. Height, width, and padding should be specified via the height,\nwidth, and padding props, as they are used to calculate the alignment of\ncomponents within chart.\n\n\n@example {data: {fill: \"red\"}, labels: {fontSize: 12}}"
407
+ },
408
+ {
409
+ "name": "theme",
410
+ "type": "object",
411
+ "description": "The theme prop takes a style object with nested data, labels, and parent objects.\nYou can create this object yourself, or you can use a theme provided by\nWhen using ChartArea as a solo component, implement the theme directly on\nChartArea. If you are wrapping ChartArea in ChartChart or ChartGroup,\nplease call the theme on the outermost wrapper component instead.",
412
+ "defaultValue": "getTheme(themeColor)"
413
+ },
414
+ {
415
+ "name": "themeColor",
416
+ "type": "string",
417
+ "description": "Specifies the theme color. Valid values are 'blue', 'green', 'multi', etc.\n\nNote: Not compatible with theme prop\n\n@example themeColor={ChartThemeColor.blue}"
418
+ },
419
+ {
420
+ "name": "width",
421
+ "type": "number",
422
+ "description": "The width props specifies the width of the svg viewBox of the chart container\nThis value should be given as a number of pixels"
423
+ },
424
+ {
425
+ "name": "x",
426
+ "type": "number | string | Function | string[]",
427
+ "description": "The x prop specifies how to access the X value of each data point.\nIf given as a function, it will be run on each data point, and returned value will be used.\nIf given as an integer, it will be used as an array index for array-type data points.\nIf given as a string, it will be used as a property key for object-type data points.\nIf given as an array of strings, or a string containing dots or brackets,\nit will be used as a nested object property path (for details see Lodash docs for _.get).\nIf `null` or `undefined`, the data value will be used as is (identity function/pass-through).\n\n\n@example 0, 'x', 'x.value.nested.1.thing', 'x[2].also.nested', null, d => Math.sin(d)"
428
+ },
429
+ {
430
+ "name": "y",
431
+ "type": "number | string | Function | string[]",
432
+ "description": "The y prop specifies how to access the Y value of each data point.\nIf given as a function, it will be run on each data point, and returned value will be used.\nIf given as an integer, it will be used as an array index for array-type data points.\nIf given as a string, it will be used as a property key for object-type data points.\nIf given as an array of strings, or a string containing dots or brackets,\nit will be used as a nested object property path (for details see Lodash docs for _.get).\nIf `null` or `undefined`, the data value will be used as is (identity function/pass-through).\n\n\n@example 0, 'y', 'y.value.nested.1.thing', 'y[2].also.nested', null, d => Math.sin(d)"
433
+ },
434
+ {
435
+ "name": "y0",
436
+ "type": "number | string | Function | string[]",
437
+ "description": "Use y0 data accessor prop to determine how the component defines the baseline y0 data.\nThis prop is useful for defining custom baselines for components like ChartArea.\nThis prop may be given in a variety of formats.\n\n\n@example 'last_quarter_profit', () => 10, 1, 'employees.salary', [\"employees\", \"salary\"]"
438
+ }
439
+ ]
440
+ },
441
+ {
442
+ "name": "ChartAxis",
443
+ "description": "ChartAxis renders a single axis which can be used on its own or composed with Chart.\n\nSee https://github.com/FormidableLabs/victory/blob/main/packages/victory-axis/src/index.d.ts",
444
+ "props": [
445
+ {
446
+ "name": "animate",
447
+ "type": "boolean | object",
448
+ "description": "The animate prop specifies props for VictoryAnimation to use.\nThe animate prop should also be used to specify enter and exit\ntransition configurations with the `onExit` and `onEnter` namespaces respectively.\n\n\n@example {duration: 500, onExit: () => {}, onEnter: {duration: 500, before: () => ({y: 0})})}"
449
+ },
450
+ {
451
+ "name": "axisComponent",
452
+ "type": "React.ReactElement<any>",
453
+ "description": "The axisComponent prop takes in an entire component which will be used\nto create the axis line. The new element created from the passed axisComponent\nwill be supplied with the following properties: x1, y1, x2, y2, style and events.\nAny of these props may be overridden by passing in props to the supplied component,\nor modified or ignored within the custom component itself. If an axisComponent\nis not supplied, ChartAxis will render its default AxisLine component."
454
+ },
455
+ {
456
+ "name": "axisLabelComponent",
457
+ "type": "React.ReactElement<any>",
458
+ "description": "The axisLabelComponent prop takes in an entire component which will be used\nto create the axis label. The new element created from the passed axisLabelComponent\nwill be supplied with the following properties: x, y, verticalAnchor, textAnchor,\nangle, transform, style and events. Any of these props may be overridden by\npassing in props to the supplied component, or modified or ignored within\nthe custom component itself. If an axisLabelComponent is not supplied, a new\nChartLabel will be created with props described above",
459
+ "defaultValue": "<ChartLabel />"
460
+ },
461
+ {
462
+ "name": "axisValue",
463
+ "type": "number | string | object | Date",
464
+ "description": "The axisValue prop may be used instead of axisAngle to position the dependent axis. Ths prop is useful when\ndependent axes should line up with values on the independent axis."
465
+ },
466
+ {
467
+ "name": "containerComponent",
468
+ "type": "React.ReactElement<any>",
469
+ "description": "The containerComponent prop takes an entire component which will be used to\ncreate a container element for standalone charts.\nThe new element created from the passed containerComponent wil be provided with\nthese props from ChartAxis: height, width, children\n(the chart itself) and style. Props that are not provided by the\nchild chart component include title and desc, both of which\nare intended to add accessibility to Victory components. The more descriptive these props\nare, the more accessible your data will be for people using screen readers.\nAny of these props may be overridden by passing in props to the supplied component,\nor modified or ignored within the custom component itself. If a dataComponent is\nnot provided, ChartAxis will use the default ChartContainer component.\n\n@example <ChartContainer title=\"Chart of Dog Breeds\" desc=\"This chart shows ...\" />",
470
+ "defaultValue": "<ChartContainer />"
471
+ },
472
+ {
473
+ "name": "crossAxis",
474
+ "type": "boolean",
475
+ "description": "This prop specifies whether a given axis is intended to cross another axis."
476
+ },
477
+ {
478
+ "name": "dependentAxis",
479
+ "type": "boolean",
480
+ "description": "The dependentAxis prop specifies whether the axis corresponds to the\ndependent variable (usually y). This prop is useful when composing axis\nwith other components to form a chart."
481
+ },
482
+ {
483
+ "name": "domain",
484
+ "type": "number[] | { x: number[], y: number[] }",
485
+ "description": "The domain prop describes the range of values your axis will include. This prop should be\ngiven as a array of the minimum and maximum expected values for your axis.\nIf this value is not given it will be calculated based on the scale or tickValues.\n\n\n@example [low, high], { x: [low, high], y: [low, high] }\n\n[-1, 1], {x: [0, 100], y: [0, 1]}"
486
+ },
487
+ {
488
+ "name": "domainPadding",
489
+ "type": "number | number[] | { x: number[], y: number[] }",
490
+ "description": "The domainPadding prop specifies a number of pixels of padding to add to the\nbeginning and end of a domain. This prop is useful for explicitly spacing ticks farther\nfrom the origin to prevent crowding. This prop should be given as an object with\nnumbers specified for x and y.\n\n\n@example [left, right], { x: [left, right], y: [bottom, top] }\n\n{x: [10, -10], y: 5}"
491
+ },
492
+ {
493
+ "name": "events",
494
+ "type": "object[]",
495
+ "description": "The event prop take an array of event objects. Event objects are composed of\na target, an eventKey, and eventHandlers. Targets may be any valid style namespace\nfor a given component, so \"axis\", \"axisLabel\", \"ticks\", \"tickLabels\", and \"grid\" are\nall valid targets for ChartAxis events. The eventKey may optionally be used to select a\nsingle element by index rather than an entire set. The eventHandlers object\nshould be given as an object whose keys are standard event names (i.e. onClick)\nand whose values are event callbacks. The return value of an event handler\nbe used to modify other elements. The return value should be given as an object or\nan array of objects with optional target and eventKey keys, and a mutation\nkey whose value is a function. The target and eventKey keys will default to those\ncorresponding to the element the event handler was attached to. The mutation\nfunction will be called with the calculated props for the individual selected\nelement (i.e. a single tick), and the object returned from the mutation function\nwill override the props of the selected element via object assignment.\n\n\n@example\nevents={[\n {\n target: \"grid\",\n eventKey: 2,\n eventHandlers: {\n onClick: () => {\n return [\n {\n mutation: (props) => {\n return {style: merge({}, props.style, {stroke: \"orange\"})};\n }\n }, {\n target: \"tickLabels\",\n mutation: () => {\n return {text: \"hey\"};\n }\n }\n ];\n }\n }\n }\n]}"
496
+ },
497
+ {
498
+ "name": "externalEventMutations",
499
+ "type": "object[]",
500
+ "description": "ChartAxis uses the standard externalEventMutations prop."
501
+ },
502
+ {
503
+ "name": "fixAxisLabelHeight",
504
+ "type": "boolean",
505
+ "description": "When true, this prop adjusts the height between the axis label and bottom positioned legend"
506
+ },
507
+ {
508
+ "name": "fixLabelOverlap",
509
+ "type": "boolean",
510
+ "description": "When true, this prop reduces the number of tick labels to fit the length of the axis.\nLabels are removed at approximately even intervals from the original array of labels.\nThis feature only works well for labels that are approximately evenly spaced."
511
+ },
512
+ {
513
+ "name": "gridComponent",
514
+ "type": "React.ReactElement<any>",
515
+ "description": "The gridComponent prop takes in an entire component which will be used\nto create grid lines. The new element created from the passed gridComponent\nwill be supplied with the following properties: x1, y1, x2, y2, tick, style and events.\nAny of these props may be overridden by passing in props to the supplied component,\nor modified or ignored within the custom component itself. If a gridComponent\nis not supplied, ChartAxis will render its default GridLine component."
516
+ },
517
+ {
518
+ "name": "groupComponent",
519
+ "type": "React.ReactElement<any>",
520
+ "description": "The groupComponent prop takes an entire component which will be used to\ncreate group elements for use within container elements. This prop defaults\nto a <g> tag on web, and a react-native-svg <G> tag on mobile"
521
+ },
522
+ {
523
+ "name": "height",
524
+ "type": "number",
525
+ "description": "Specifies the height the svg viewBox of the chart container. This value should be given as a\nnumber of pixels.\n\nBecause Victory renders responsive containers, the width and height props do not determine the width and\nheight of the chart in number of pixels, but instead define an aspect ratio for the chart. The exact number of\npixels will depend on the size of the container the chart is rendered into."
526
+ },
527
+ {
528
+ "name": "invertAxis",
529
+ "type": "boolean",
530
+ "description": "If true, this value will flip the domain of a given axis."
531
+ },
532
+ {
533
+ "name": "label",
534
+ "type": "any",
535
+ "description": "The label prop defines the label that will appear along the axis. This\nprop should be given as a value or an entire, HTML-complete label\ncomponent. If a label component is given, it will be cloned. The new\nelement's properties x, y, textAnchor, verticalAnchor, and transform\nwill have defaults provided by the axis; styles filled out with\ndefaults provided by the axis, and overrides from the label component.\nIf a value is given, a new ChartLabel will be created with props and\nstyles from the axis."
536
+ },
537
+ {
538
+ "name": "maxDomain",
539
+ "type": "number | { x?: number; y?: number }",
540
+ "description": "The maxDomain prop defines a maximum domain value for a chart. This prop is useful in situations where the maximum\ndomain of a chart is static, while the minimum value depends on data or other variable information. If the domain\nprop is set in addition to maximumDomain, domain will be used.\n\nNote: The x value supplied to the maxDomain prop refers to the independent variable, and the y value refers to the\ndependent variable. This may cause confusion in horizontal charts, as the independent variable will corresponds to\nthe y axis.\n\n@example\n\nmaxDomain={0}\nmaxDomain={{ y: 0 }}"
541
+ },
542
+ {
543
+ "name": "minDomain",
544
+ "type": "number | { x?: number; y?: number }",
545
+ "description": "The minDomain prop defines a minimum domain value for a chart. This prop is useful in situations where the minimum\ndomain of a chart is static, while the maximum value depends on data or other variable information. If the domain\nprop is set in addition to minimumDomain, domain will be used.\n\nNote: The x value supplied to the minDomain prop refers to the independent variable, and the y value refers to the\ndependent variable. This may cause confusion in horizontal charts, as the independent variable will corresponds to\nthe y axis.\n\n@example\n\nminDomain={0}\nminDomain={{ y: 0 }}"
546
+ },
547
+ {
548
+ "name": "name",
549
+ "type": "string",
550
+ "description": "The name prop is typically used to reference a component instance when defining shared events. However, this\noptional prop may also be applied to child elements as an ID prefix. This is a workaround to ensure Victory\nbased components output unique IDs when multiple charts appear in a page."
551
+ },
552
+ {
553
+ "name": "offsetX",
554
+ "type": "number",
555
+ "description": "This value describes how far from the \"edge\" of its permitted area each axis\nwill be set back in the x-direction. If this prop is not given,\nthe offset is calculated based on font size, axis orientation, and label padding."
556
+ },
557
+ {
558
+ "name": "offsetY",
559
+ "type": "number",
560
+ "description": "This value describes how far from the \"edge\" of its permitted area each axis\nwill be set back in the y-direction. If this prop is not given,\nthe offset is calculated based on font size, axis orientation, and label padding."
561
+ },
562
+ {
563
+ "name": "orientation",
564
+ "type": "string",
565
+ "description": "The orientation prop specifies the position and orientation of your axis.\nValid values are 'top', 'bottom', 'left' and 'right'."
566
+ },
567
+ {
568
+ "name": "padding",
569
+ "type": "number | { top: number, bottom: number, left: number, right: number }",
570
+ "description": "The padding props specifies the amount of padding in number of pixels between\nthe edge of the chart and any rendered child components. This prop can be given\nas a number or as an object with padding specified for top, bottom, left\nand right."
571
+ },
572
+ {
573
+ "name": "range",
574
+ "type": "number[] | { x: number[], y: number[] }",
575
+ "description": "The range prop describes the dimensions over which data may be plotted. For cartesian coordinate systems, this\ncorresponds to minimum and maximum svg coordinates in the x and y dimension. In polar coordinate systems this\ncorresponds to a range of angles and radii. When this value is not given it will be calculated from the width,\nheight, and padding, or from the startAngle and endAngle in the case of polar charts. All components in a given\nchart must share the same range, so setting this prop on children nested within Chart, ChartStack, or\nChartGroup will have no effect. This prop is usually not set manually.\n\n\n@example [low, high] | { x: [low, high], y: [low, high] }\n\nCartesian: range={{ x: [50, 250], y: [50, 250] }}\nPolar: range={{ x: [0, 360], y: [0, 250] }}"
576
+ },
577
+ {
578
+ "name": "scale",
579
+ "type": "string | { x: string, y: string }",
580
+ "description": "The scale prop determines which scales your chart should use. This prop can be\ngiven as a string specifying a supported scale (\"linear\", \"time\", \"log\", \"sqrt\"),\nas a d3 scale function, or as an object with scales specified for x and y\n\n\n@example d3Scale.time(), {x: \"linear\", y: \"log\"}"
581
+ },
582
+ {
583
+ "name": "showGrid",
584
+ "type": "boolean",
585
+ "description": "Show axis grid and ticks",
586
+ "defaultValue": "false"
587
+ },
588
+ {
589
+ "name": "singleQuadrantDomainPadding",
590
+ "type": "boolean | { x?: boolean; y?: boolean }",
591
+ "description": "By default domainPadding is coerced to existing quadrants. This means that if a given domain only includes positive\nvalues, no amount of padding applied by domainPadding will result in a domain with negative values. This is the\ndesired behavior in most cases. For users that need to apply padding without regard to quadrant, the\nsingleQuadrantDomainPadding prop may be used. This prop may be given as a boolean or an object with boolean values\nspecified for \"x\" and/or \"y\". When this prop is false (or false for a given dimension), padding will be applied\nwithout regard to quadrant. If this prop is not specified, domainPadding will be coerced to existing quadrants.\n\nNote: The x value supplied to the singleQuadrantDomainPadding prop refers to the independent variable, and the y\nvalue refers to the dependent variable. This may cause confusion in horizontal charts, as the independent variable\nwill corresponds to the y axis.\n\n@example\n\nsingleQuadrantDomainPadding={false}\nsingleQuadrantDomainPadding={{ x: false }}"
592
+ },
593
+ {
594
+ "name": "standalone",
595
+ "type": "boolean",
596
+ "description": "The standalone prop determines whether the component will render a standalone svg\nor a <g> tag that will be included in an external svg. Set standalone to false to\ncompose ChartAxis with other components within an enclosing <svg> tag."
597
+ },
598
+ {
599
+ "name": "style",
600
+ "type": "{ axis: object, axisLabel: object, grid: object, ticks: object, tickLabels: object }",
601
+ "description": "The style prop defines the style of the component. The style prop should be given as an object\nwith styles defined for parent, axis, axisLabel, grid, ticks, and tickLabels. Any valid svg\nstyles are supported, but width, height, and padding should be specified via props as they\ndetermine relative layout for components in Chart. Functional styles may be defined for\ngrid, tick, and tickLabel style properties, and they will be evaluated with each tick.\n\nNote: When a component is rendered as a child of another Victory component, or within a custom\n<svg> element with standalone={false} parent styles will be applied to the enclosing <g> tag.\nMany styles that can be applied to a parent <svg> will not be expressed when applied to a <g>.\n\nNote: custom angle and verticalAnchor properties may be included in labels styles."
602
+ },
603
+ {
604
+ "name": "theme",
605
+ "type": "object",
606
+ "description": "The theme prop takes a style object with nested data, labels, and parent objects.\nYou can create this object yourself, or you can use a theme provided by\nWhen using ChartAxis as a solo component, implement the theme directly on\nChartAxis. If you are wrapping ChartAxis in ChartChart or ChartGroup,\nplease call the theme on the outermost wrapper component instead.",
607
+ "defaultValue": "getTheme(themeColor)"
608
+ },
609
+ {
610
+ "name": "themeColor",
611
+ "type": "string",
612
+ "description": "Specifies the theme color. Valid values are 'blue', 'green', 'multi', etc.\n\nNote: Not compatible with theme prop\n\n@example themeColor={ChartThemeColor.blue}"
613
+ },
614
+ {
615
+ "name": "tickComponent",
616
+ "type": "React.ReactElement<any>",
617
+ "description": "The tickComponent prop takes in an entire component which will be used\nto create tick lines. The new element created from the passed tickComponent\nwill be supplied with the following properties: x1, y1, x2, y2, tick, style and events.\nAny of these props may be overridden by passing in props to the supplied component,\nor modified or ignored within the custom component itself. If a tickComponent\nis not supplied, ChartAxis will render its default Tick component."
618
+ },
619
+ {
620
+ "name": "tickCount",
621
+ "type": "number",
622
+ "description": "The tickCount prop specifies approximately how many ticks should be drawn on the axis if\ntickValues are not explicitly provided. This value is calculated by d3 scale and\nprioritizes returning \"nice\" values and evenly spaced ticks over an exact number of ticks.\nIf you need an exact number of ticks, please specify them via the tickValues prop.\nThis prop must have a value greater than zero."
623
+ },
624
+ {
625
+ "name": "tickFormat",
626
+ "type": "any[] | ((tick: any, index: number, ticks: any[]) => string | number)",
627
+ "description": "The tickFormat prop specifies how tick values should be expressed visually.\ntickFormat can be given as a function to be applied to every tickValue, or as\nan array of display values for each tickValue.\n\n@example d3.time.format(\"%Y\"), (x) => x.toPrecision(2), [\"first\", \"second\", \"third\"]"
628
+ },
629
+ {
630
+ "name": "tickLabelComponent",
631
+ "type": "React.ReactElement<any>",
632
+ "description": "The tickLabelComponent prop takes in an entire component which will be used\nto create the tick labels. The new element created from the passed tickLabelComponent\nwill be supplied with the following properties: x, y, verticalAnchor, textAnchor,\nangle, tick, style and events. Any of these props may be overridden by\npassing in props to the supplied component, or modified or ignored within\nthe custom component itself. If an tickLabelComponent is not supplied, a new\nChartLabel will be created with props described above",
633
+ "defaultValue": "<ChartLabel />"
634
+ },
635
+ {
636
+ "name": "tickValues",
637
+ "type": "any[]",
638
+ "description": "The tickValues prop explicitly specifies which tick values to draw on the axis.\n\n@example [\"apples\", \"bananas\", \"oranges\"], [2, 4, 6, 8]"
639
+ },
640
+ {
641
+ "name": "width",
642
+ "type": "number",
643
+ "description": "Specifies the width of the svg viewBox of the chart container. This value should be given as a\nnumber of pixels.\n\nBecause Victory renders responsive containers, the width and height props do not determine the width and\nheight of the chart in number of pixels, but instead define an aspect ratio for the chart. The exact number of\npixels will depend on the size of the container the chart is rendered into.\n\nNote: innerRadius may need to be set when using this property."
644
+ }
645
+ ]
646
+ },
647
+ {
648
+ "name": "ChartBar",
649
+ "description": "ChartBar renders a dataset as series of bars. ChartBar can be composed with Chart to create bar charts.\n\nSee https://github.com/FormidableLabs/victory/blob/main/packages/victory-bar/src/index.d.ts",
650
+ "props": [
651
+ {
652
+ "name": "alignment",
653
+ "type": "string",
654
+ "description": "The alignment prop specifies how bars should be aligned relative to their data points.\nThis prop may be given as “start”, “middle” or “end”. When this prop is not specified,\nbars will have “middle” alignment relative to their data points."
655
+ },
656
+ {
657
+ "name": "animate",
658
+ "type": "boolean | object",
659
+ "description": "The animate prop specifies props for VictoryAnimation to use.\nThe animate prop should also be used to specify enter and exit\ntransition configurations with the `onExit` and `onEnter` namespaces respectively.\n\n\n@example {duration: 500, onExit: () => {}, onEnter: {duration: 500, before: () => ({y: 0})})}"
660
+ },
661
+ {
662
+ "name": "barRatio",
663
+ "type": "number",
664
+ "description": "The barRatio prop specifies an approximate ratio between bar widths and spaces between bars.\nWhen width is not specified via the barWidth prop or in bar styles, the barRatio prop will\nbe used to calculate a default width for each bar given the total number of bars in the data series\nand the overall width of the chart."
665
+ },
666
+ {
667
+ "name": "barWidth",
668
+ "type": "number | Function",
669
+ "description": "The barWidth prop is used to specify the width of each bar. This prop may be given as\na number of pixels or as a function that returns a number. When this prop is given as\na function, it will be evaluated with the arguments datum, and active. When this value\nis not given, a default value will be calculated based on the overall dimensions of\nthe chart, and the number of bars."
670
+ },
671
+ {
672
+ "name": "categories",
673
+ "type": "string[] | { x: string[], y: string[] }",
674
+ "description": "The categories prop specifies how categorical data for a chart should be ordered.\nThis prop should be given as an array of string values, or an object with\nthese arrays of values specified for x and y. If this prop is not set,\ncategorical data will be plotted in the order it was given in the data array\n\n\n@example [\"dogs\", \"cats\", \"mice\"]"
675
+ },
676
+ {
677
+ "name": "containerComponent",
678
+ "type": "React.ReactElement<any>",
679
+ "description": "The containerComponent prop takes an entire component which will be used to\ncreate a container element for standalone charts.\nThe new element created from the passed containerComponent wil be provided with\nthese props from ChartBar: height, width, children\n(the chart itself) and style. Props that are not provided by the\nchild chart component include title and desc, both of which\nare intended to add accessibility to Victory components. The more descriptive these props\nare, the more accessible your data will be for people using screen readers.\nAny of these props may be overridden by passing in props to the supplied component,\nor modified or ignored within the custom component itself. If a dataComponent is\nnot provided, ChartBar will use the default ChartContainer component.\n\n@example <ChartContainer title=\"Chart of Dog Breeds\" desc=\"This chart shows...\" />",
680
+ "defaultValue": "<ChartContainer />"
681
+ },
682
+ {
683
+ "name": "cornerRadius",
684
+ "type": "Function | number | { top, bottom, topLeft, topRight, bottomLeft, bottomRight }",
685
+ "description": "The cornerRadius prop specifies a radius to apply to each bar.\nIf this prop is given as a single number, the radius will only be applied to the top of each bar.\nWhen this prop is given as a function, it will be evaluated with the arguments datum, and active.\n\n\n@example {topLeft: ({ datum }) => datum.x * 4}"
686
+ },
687
+ {
688
+ "name": "data",
689
+ "type": "any[]",
690
+ "description": "The data prop specifies the data to be plotted. Data should be in the form of an array\nof data points, or an array of arrays of data points for multiple datasets.\nEach data point may be any format you wish (depending on the `x` and `y` accessor props),\nbut by default, an object with x and y properties is expected.\n\n@example\n\n[{x: 1, y: 2}, {x: 2, y: 3}], [[1, 2], [2, 3]],\n[[{x: \"a\", y: 1}, {x: \"b\", y: 2}], [{x: \"a\", y: 2}, {x: \"b\", y: 3}]]"
691
+ },
692
+ {
693
+ "name": "dataComponent",
694
+ "type": "React.ReactElement<any>",
695
+ "description": "The dataComponent prop takes an entire component which will be used to create a bar.\nThe new element created from the passed dataComponent will be provided with the\nfollowing properties calculated by ChartBar: a scale, style, events, interpolation,\nand an array of modified data objects (including x, y, and calculated y0 and y1).\nAny of these props may be overridden by passing in props to the supplied component,\nor modified or ignored within the custom component itself. If a dataComponent is\nnot provided, ChartBar will use its default Bar component."
696
+ },
697
+ {
698
+ "name": "domain",
699
+ "type": "number[] | { x: number[], y: number[] }",
700
+ "description": "The domain prop describes the range of values your chart will cover. This prop can be\ngiven as a array of the minimum and maximum expected values for your bar chart,\nor as an object that specifies separate arrays for x and y.\nIf this prop is not provided, a domain will be calculated from data, or other\navailable information.\n\n\n@example [low, high], { x: [low, high], y: [low, high] }\n\n[-1, 1], {x: [0, 100], y: [0, 1]}"
701
+ },
702
+ {
703
+ "name": "domainPadding",
704
+ "type": "number | number[] | { x: number[], y: number[] }",
705
+ "description": "The domainPadding prop specifies a number of pixels of padding to add to the\nbeginning and end of a domain. This prop is useful for explicitly spacing ticks farther\nfrom the origin to prevent crowding. This prop should be given as an object with\nnumbers specified for x and y.\n\n\n@example [left, right], { x: [left, right], y: [bottom, top] }\n\n{x: [10, -10], y: 5}"
706
+ },
707
+ {
708
+ "name": "eventKey",
709
+ "type": "number | string | Function",
710
+ "description": "Similar to data accessor props `x` and `y`, this prop may be used to functionally\nassign eventKeys to data"
711
+ },
712
+ {
713
+ "name": "events",
714
+ "type": "object[]",
715
+ "description": "The event prop take an array of event objects. Event objects are composed of\na target, an eventKey, and eventHandlers. Targets may be any valid style namespace\nfor a given component, so \"data\" and \"labels\" are all valid targets for VictoryBar events.\nThe eventKey may optionally be used to select a single element by index rather than an entire\nset. The eventHandlers object should be given as an object whose keys are standard\nevent names (i.e. onClick) and whose values are event callbacks. The return value\nof an event handler is used to modify elements. The return value should be given\nas an object or an array of objects with optional target and eventKey keys,\nand a mutation key whose value is a function. The target and eventKey keys\nwill default to those corresponding to the element the event handler was attached to.\nThe mutation function will be called with the calculated props for the individual selected\nelement (i.e. a single bar), and the object returned from the mutation function\nwill override the props of the selected element via object assignment.\n\n\n@example\nevents={[\n {\n target: \"data\",\n eventKey: \"thisOne\",\n eventHandlers: {\n onClick: () => {\n return [\n {\n eventKey: \"theOtherOne\",\n mutation: (props) => {\n return {style: merge({}, props.style, {fill: \"orange\"})};\n }\n }, {\n eventKey: \"theOtherOne\",\n target: \"labels\",\n mutation: () => {\n return {text: \"hey\"};\n }\n }\n ];\n }\n }\n }\n]}"
716
+ },
717
+ {
718
+ "name": "externalEventMutations",
719
+ "type": "object[]",
720
+ "description": "ChartBar uses the standard externalEventMutations prop."
721
+ },
722
+ {
723
+ "name": "groupComponent",
724
+ "type": "React.ReactElement<any>",
725
+ "description": "The groupComponent prop takes an entire component which will be used to\ncreate group elements for use within container elements. This prop defaults\nto a <g> tag on web, and a react-native-svg <G> tag on mobile"
726
+ },
727
+ {
728
+ "name": "height",
729
+ "type": "number",
730
+ "description": "The height props specifies the height the svg viewBox of the chart container.\nThis value should be given as a number of pixels"
731
+ },
732
+ {
733
+ "name": "horizontal",
734
+ "type": "boolean",
735
+ "description": "The horizontal prop determines whether the bars will be laid vertically or\nhorizontally. The bars will be vertical if this prop is false or unspecified,\nor horizontal if the prop is set to true."
736
+ },
737
+ {
738
+ "name": "labelComponent",
739
+ "type": "React.ReactElement<any>",
740
+ "description": "The labelComponent prop takes in an entire label component which will be used\nto create a label for the bar. The new element created from the passed labelComponent\nwill be supplied with the following properties: x, y, index, data, verticalAnchor,\ntextAnchor, angle, style, text, and events. any of these props may be overridden\nby passing in props to the supplied component, or modified or ignored within\nthe custom component itself. If labelComponent is omitted, a new ChartLabel\nwill be created with props described above. This labelComponent prop should be used to\nprovide a series label for ChartBar. If individual labels are required for each\ndata point, they should be created by composing ChartBar with VictoryScatter"
741
+ },
742
+ {
743
+ "name": "labels",
744
+ "type": "string[] | number[] | ((data: any) => string | number | null)",
745
+ "description": "The labels prop defines labels that will appear above each bar in your chart.\nThis prop should be given as an array of values or as a function of data.\nIf given as an array, the number of elements in the array should be equal to\nthe length of the data array. Labels may also be added directly to the data object\nlike data={[{x: 1, y: 1, label: \"first\"}]}.\n\n@example [\"spring\", \"summer\", \"fall\", \"winter\"], (datum) => datum.title"
746
+ },
747
+ {
748
+ "name": "maxDomain",
749
+ "type": "number | { x?: number; y?: number }",
750
+ "description": "The maxDomain prop defines a maximum domain value for a chart. This prop is useful in situations where the maximum\ndomain of a chart is static, while the minimum value depends on data or other variable information. If the domain\nprop is set in addition to maximumDomain, domain will be used.\n\nNote: The x value supplied to the maxDomain prop refers to the independent variable, and the y value refers to the\ndependent variable. This may cause confusion in horizontal charts, as the independent variable will corresponds to\nthe y axis.\n\n@example\n\nmaxDomain={0}\nmaxDomain={{ y: 0 }}"
751
+ },
752
+ {
753
+ "name": "minDomain",
754
+ "type": "number | { x?: number; y?: number }",
755
+ "description": "The minDomain prop defines a minimum domain value for a chart. This prop is useful in situations where the minimum\ndomain of a chart is static, while the maximum value depends on data or other variable information. If the domain\nprop is set in addition to minimumDomain, domain will be used.\n\nNote: The x value supplied to the minDomain prop refers to the independent variable, and the y value refers to the\ndependent variable. This may cause confusion in horizontal charts, as the independent variable will corresponds to\nthe y axis.\n\n@example\n\nminDomain={0}\nminDomain={{ y: 0 }}"
756
+ },
757
+ {
758
+ "name": "name",
759
+ "type": "string",
760
+ "description": "The name prop is used to reference a component instance when defining shared events."
761
+ },
762
+ {
763
+ "name": "origin",
764
+ "type": "{ x: number, y: number }",
765
+ "description": "Victory components will pass an origin prop is to define the center point in svg coordinates for polar charts.\n\nNote: It will not typically be necessary to set an origin prop manually"
766
+ },
767
+ {
768
+ "name": "padding",
769
+ "type": "number | { top: number, bottom: number, left: number, right: number }",
770
+ "description": "The padding props specifies the amount of padding in number of pixels between\nthe edge of the chart and any rendered child components. This prop can be given\nas a number or as an object with padding specified for top, bottom, left\nand right."
771
+ },
772
+ {
773
+ "name": "range",
774
+ "type": "number[] | { x: number[], y: number[] }",
775
+ "description": "The range prop describes the dimensions over which data may be plotted. For cartesian coordinate systems, this\ncorresponds to minimum and maximum svg coordinates in the x and y dimension. In polar coordinate systems this\ncorresponds to a range of angles and radii. When this value is not given it will be calculated from the width,\nheight, and padding, or from the startAngle and endAngle in the case of polar charts. All components in a given\nchart must share the same range, so setting this prop on children nested within Chart or\nChartGroup will have no effect. This prop is usually not set manually.\n\n\n@example [low, high] | { x: [low, high], y: [low, high] }\n\nCartesian: range={{ x: [50, 250], y: [50, 250] }}\nPolar: range={{ x: [0, 360], y: [0, 250] }}"
776
+ },
777
+ {
778
+ "name": "samples",
779
+ "type": "number",
780
+ "description": "The samples prop specifies how many individual points to plot when plotting\ny as a function of x. Samples is ignored if x props are provided instead."
781
+ },
782
+ {
783
+ "name": "scale",
784
+ "type": "string | { x: string, y: string }",
785
+ "description": "The scale prop determines which scales your chart should use. This prop can be\ngiven as a string specifying a supported scale (\"linear\", \"time\", \"log\", \"sqrt\"),\nas a d3 scale function, or as an object with scales specified for x and y\n\n\n@example d3Scale.time(), {x: \"linear\", y: \"log\"}"
786
+ },
787
+ {
788
+ "name": "singleQuadrantDomainPadding",
789
+ "type": "boolean | { x?: boolean; y?: boolean }",
790
+ "description": "By default domainPadding is coerced to existing quadrants. This means that if a given domain only includes positive\nvalues, no amount of padding applied by domainPadding will result in a domain with negative values. This is the\ndesired behavior in most cases. For users that need to apply padding without regard to quadrant, the\nsingleQuadrantDomainPadding prop may be used. This prop may be given as a boolean or an object with boolean values\nspecified for \"x\" and/or \"y\". When this prop is false (or false for a given dimension), padding will be applied\nwithout regard to quadrant. If this prop is not specified, domainPadding will be coerced to existing quadrants.\n\nNote: The x value supplied to the singleQuadrantDomainPadding prop refers to the independent variable, and the y\nvalue refers to the dependent variable. This may cause confusion in horizontal charts, as the independent variable\nwill corresponds to the y axis.\n\n@example\n\nsingleQuadrantDomainPadding={false}\nsingleQuadrantDomainPadding={{ x: false }}"
791
+ },
792
+ {
793
+ "name": "sortKey",
794
+ "type": "number | string | Function | string[]",
795
+ "description": "Use the sortKey prop to indicate how data should be sorted. This prop\nis given directly to the lodash sortBy function to be executed on the\nfinal dataset."
796
+ },
797
+ {
798
+ "name": "sortOrder",
799
+ "type": "string",
800
+ "description": "The sortOrder prop specifies whether sorted data should be returned in 'ascending' or 'descending' order."
801
+ },
802
+ {
803
+ "name": "standalone",
804
+ "type": "boolean",
805
+ "description": "The standalone prop determines whether the component will render a standalone svg\nor a <g> tag that will be included in an external svg. Set standalone to false to\ncompose ChartBar with other components within an enclosing <svg> tag."
806
+ },
807
+ {
808
+ "name": "style",
809
+ "type": "{ parent: object, data: object, labels: object }",
810
+ "description": "The style prop specifies styles for your ChartBar. Any valid inline style properties\nwill be applied. Height, width, and padding should be specified via the height,\nwidth, and padding props, as they are used to calculate the alignment of\ncomponents within chart.\n\n\n@example {data: {fill: \"red\"}, labels: {fontSize: 12}}"
811
+ },
812
+ {
813
+ "name": "theme",
814
+ "type": "object",
815
+ "description": "The theme prop takes a style object with nested data, labels, and parent objects.\nYou can create this object yourself, or you can use a theme provided by\nWhen using ChartBar as a solo component, implement the theme directly on\nChartBar. If you are wrapping ChartBar in ChartChart or ChartGroup,\nplease call the theme on the outermost wrapper component instead.",
816
+ "defaultValue": "getTheme(themeColor)"
817
+ },
818
+ {
819
+ "name": "themeColor",
820
+ "type": "string",
821
+ "description": "Specifies the theme color. Valid values are 'blue', 'green', 'multi', etc.\n\nNote: Not compatible with theme prop\n\n@example themeColor={ChartThemeColor.blue}"
822
+ },
823
+ {
824
+ "name": "width",
825
+ "type": "number",
826
+ "description": "The width props specifies the width of the svg viewBox of the chart container\nThis value should be given as a number of pixels"
827
+ },
828
+ {
829
+ "name": "x",
830
+ "type": "number | string | Function | string[]",
831
+ "description": "The x prop specifies how to access the X value of each data point.\nIf given as a function, it will be run on each data point, and returned value will be used.\nIf given as an integer, it will be used as an array index for array-type data points.\nIf given as a string, it will be used as a property key for object-type data points.\nIf given as an array of strings, or a string containing dots or brackets,\nit will be used as a nested object property path (for details see Lodash docs for _.get).\nIf `null` or `undefined`, the data value will be used as is (identity function/pass-through).\n\n\n@example 0, 'x', 'x.value.nested.1.thing', 'x[2].also.nested', null, d => Math.sin(d)"
832
+ },
833
+ {
834
+ "name": "y",
835
+ "type": "number | string | Function | string[]",
836
+ "description": "The y prop specifies how to access the Y value of each data point.\nIf given as a function, it will be run on each data point, and returned value will be used.\nIf given as an integer, it will be used as an array index for array-type data points.\nIf given as a string, it will be used as a property key for object-type data points.\nIf given as an array of strings, or a string containing dots or brackets,\nit will be used as a nested object property path (for details see Lodash docs for _.get).\nIf `null` or `undefined`, the data value will be used as is (identity function/pass-through).\n\n\n@example 0, 'y', 'y.value.nested.1.thing', 'y[2].also.nested', null, d => Math.sin(d)"
837
+ },
838
+ {
839
+ "name": "y0",
840
+ "type": "number | string | Function | string[]",
841
+ "description": "Use y0 data accessor prop to determine how the component defines the baseline y0 data.\nThis prop is useful for defining custom baselines for components like ChartBar.\nThis prop may be given in a variety of formats.\n\n\n@example 'last_quarter_profit', () => 10, 1, 'employees.salary', [\"employees\", \"salary\"]"
842
+ }
843
+ ]
844
+ },
845
+ {
846
+ "name": "ChartBullet",
847
+ "description": "ChartBullet renders a dataset as a bullet chart.\n\nSee https://github.com/FormidableLabs/victory/blob/main/packages/victory-chart/src/victory-chart.tsx",
848
+ "props": [
849
+ {
850
+ "name": "allowTooltip",
851
+ "type": "boolean",
852
+ "description": "Specifies the tooltip capability of the container component. A value of true allows the chart to add a\nChartTooltip component to the labelComponent property. This is a shortcut to display tooltips when the labels\nproperty is also provided.",
853
+ "defaultValue": "true"
854
+ },
855
+ {
856
+ "name": "ariaDesc",
857
+ "type": "string",
858
+ "description": "The ariaDesc prop specifies the description of the chart/SVG to assist with\naccessibility for screen readers."
859
+ },
860
+ {
861
+ "name": "ariaTitle",
862
+ "type": "string",
863
+ "description": "The ariaTitle prop specifies the title to be applied to the SVG to assist\naccessibility for screen readers."
864
+ },
865
+ {
866
+ "name": "axisComponent",
867
+ "type": "React.ReactElement<any>",
868
+ "description": "The axis component to render with the chart",
869
+ "defaultValue": "<ChartAxis />"
870
+ },
871
+ {
872
+ "name": "bulletSize",
873
+ "type": "number",
874
+ "description": "Specifies the size of the bullet chart. For a horizontal chart, this adjusts bar height; although, it\ntechnically scales the underlying barWidth property.\n\nNote: Values should be >= 125, the default is 140",
875
+ "defaultValue": "theme.chart.height"
876
+ },
877
+ {
878
+ "name": "comparativeErrorMeasureComponent",
879
+ "type": "React.ReactElement<any>",
880
+ "description": "The comparative error measure component to render with the chart",
881
+ "defaultValue": "<ChartBulletComparativeErrorMeasure />"
882
+ },
883
+ {
884
+ "name": "comparativeErrorMeasureData",
885
+ "type": "any[]",
886
+ "description": "The data prop specifies the data to be plotted. Data should be in the form of an array\nof data points, or an array of arrays of data points for multiple datasets.\nEach data point may be any format you wish (depending on the `comparativeErrorMeasureDataY` accessor prop),\nbut by default, an object with y properties is expected.\n\n@example comparativeErrorMeasureData={[{ y: 50 }]}"
887
+ },
888
+ {
889
+ "name": "comparativeErrorMeasureDataY",
890
+ "type": "number | string | Function | string[]",
891
+ "description": "The comparativeErrorMeasureDataY prop specifies how to access the Y value of each data point.\nIf given as a function, it will be run on each data point, and returned value will be used.\nIf given as an integer, it will be used as an array index for array-type data points.\nIf given as a string, it will be used as a property key for object-type data points.\nIf given as an array of strings, or a string containing dots or brackets,\nit will be used as a nested object property path (for details see Lodash docs for _.get).\nIf `null` or `undefined`, the data value will be used as is (identity function/pass-through).\n\n\n@example 0, 'y', 'y.value.nested.1.thing', 'y[2].also.nested', null, d => Math.sin(d)"
892
+ },
893
+ {
894
+ "name": "comparativeErrorMeasureLegendData",
895
+ "type": "{\n name?: string;\n symbol?: {\n fill?: string;\n type?: string;\n };\n}[]",
896
+ "description": "Specify data via the data prop. ChartLegend expects data as an\narray of objects with name (required), symbol, and labels properties.\nThe data prop must be given as an array.\n\n@example legendData={[{ name: `GBps capacity - 45%` }, { name: 'Unused' }]}"
897
+ },
898
+ {
899
+ "name": "comparativeWarningMeasureComponent",
900
+ "type": "React.ReactElement<any>",
901
+ "description": "The comparative warning measure component to render with the chart",
902
+ "defaultValue": "<ChartBulletComparativeWarningMeasure />"
903
+ },
904
+ {
905
+ "name": "comparativeWarningMeasureData",
906
+ "type": "any[]",
907
+ "description": "The data prop specifies the data to be plotted. Data should be in the form of an array\nof data points, or an array of arrays of data points for multiple datasets.\nEach data point may be any format you wish (depending on the `comparativeErrorMeasureDataY` accessor prop),\nbut by default, an object with y properties is expected.\n\n@example comparativeWarningMeasureData={[{ y: 50 }]}"
908
+ },
909
+ {
910
+ "name": "comparativeWarningMeasureDataY",
911
+ "type": "number | string | Function | string[]",
912
+ "description": "The comparativeWarningMeasureDataY prop specifies how to access the Y value of each data point.\nIf given as a function, it will be run on each data point, and returned value will be used.\nIf given as an integer, it will be used as an array index for array-type data points.\nIf given as a string, it will be used as a property key for object-type data points.\nIf given as an array of strings, or a string containing dots or brackets,\nit will be used as a nested object property path (for details see Lodash docs for _.get).\nIf `null` or `undefined`, the data value will be used as is (identity function/pass-through).\n\n\n@example 0, 'y', 'y.value.nested.1.thing', 'y[2].also.nested', null, d => Math.sin(d)"
913
+ },
914
+ {
915
+ "name": "comparativeWarningMeasureLegendData",
916
+ "type": "{\n name?: string;\n symbol?: {\n fill?: string;\n type?: string;\n };\n}[]",
917
+ "description": "Specify data via the data prop. ChartLegend expects data as an\narray of objects with name (required), symbol, and labels properties.\nThe data prop must be given as an array.\n\n@example legendData={[{ name: `GBps capacity - 45%` }, { name: 'Unused' }]}"
918
+ },
919
+ {
920
+ "name": "comparativeZeroMeasureComponent",
921
+ "type": "React.ReactElement<any>",
922
+ "description": "The comparative zero measure component to render with the chart",
923
+ "defaultValue": "<ChartBulletComparativeMeasure />"
924
+ },
925
+ {
926
+ "name": "constrainToVisibleArea",
927
+ "type": "boolean",
928
+ "description": "The constrainToVisibleArea prop determines whether to coerce tooltips so that they fit within the visible area of\nthe chart. When this prop is set to true, tooltip pointers will still point to the correct data point, but the\ncenter of the tooltip will be shifted to fit within the overall width and height of the svg Victory renders.",
929
+ "defaultValue": "false"
930
+ },
931
+ {
932
+ "name": "domain",
933
+ "type": "number[] | { x: number[], y: number[] }",
934
+ "description": "The domain prop describes the range of values your chart will include. This prop can be\ngiven as a array of the minimum and maximum expected values for your chart,\nor as an object that specifies separate arrays for x and y.\nIf this prop is not provided, a domain will be calculated from data, or other\navailable information.\n\nNote: The x domain is expected to be `x: [0, 2]` in order to position all measures properly\n\n\n@example [low, high], { x: [low, high], y: [low, high] }\n\n{x: [0, 2], y: [0, 100]}",
935
+ "defaultValue": "getBulletDomain({\n comparativeErrorMeasureComponent,\n comparativeErrorMeasureData,\n comparativeWarningMeasureComponent,\n comparativeWarningMeasureData,\n maxDomain,\n minDomain,\n primaryDotMeasureComponent,\n primaryDotMeasureData,\n primarySegmentedMeasureComponent,\n primarySegmentedMeasureData,\n qualitativeRangeComponent,\n qualitativeRangeData\n})"
936
+ },
937
+ {
938
+ "name": "groupSubTitle",
939
+ "type": "string",
940
+ "description": "The subtitle to render for grouped bullets"
941
+ },
942
+ {
943
+ "name": "groupTitle",
944
+ "type": "string",
945
+ "description": "The title to render for grouped bullets"
946
+ },
947
+ {
948
+ "name": "groupTitleComponent",
949
+ "type": "React.ReactElement<any>",
950
+ "description": "The group title component to render for grouped bullets",
951
+ "defaultValue": "<ChartBulletGroupTitle />"
952
+ },
953
+ {
954
+ "name": "height",
955
+ "type": "number",
956
+ "description": "Specifies the height the svg viewBox of the chart container. This value should be given as a\nnumber of pixels.\n\nBecause Victory renders responsive containers, the width and height props do not determine the width and\nheight of the chart in number of pixels, but instead define an aspect ratio for the chart. The exact number of\npixels will depend on the size of the container the chart is rendered into. Typically, the parent container is set\nto the same width in order to maintain the aspect ratio.",
957
+ "defaultValue": "horizontal ? theme.chart.height : theme.chart.width"
958
+ },
959
+ {
960
+ "name": "horizontal",
961
+ "type": "boolean",
962
+ "description": "The horizontal prop determines whether data will be plotted horizontally. When this prop is set to true, the\nindependent variable will be plotted on the y axis and the dependent variable will be plotted on the x axis.",
963
+ "defaultValue": "true"
964
+ },
965
+ {
966
+ "name": "invert",
967
+ "type": "boolean",
968
+ "description": "Invert the color scales used to represent primary measures and qualitative ranges.",
969
+ "defaultValue": "false"
970
+ },
971
+ {
972
+ "name": "labels",
973
+ "type": "string[] | number[] | ((data: any) => string | number | null)",
974
+ "description": "The labels prop defines labels that will appear above each bar in your chart.\nThis prop should be given as an array of values or as a function of data.\nIf given as an array, the number of elements in the array should be equal to\nthe length of the data array. Labels may also be added directly to the data object\nlike data={[{y: 1, label: \"first\"}]}.\n\n@example [\"spring\", \"summer\", \"fall\", \"winter\"], (datum) => datum.title"
975
+ },
976
+ {
977
+ "name": "legendAllowWrap",
978
+ "type": "boolean | ((extraHeight: number) => void)",
979
+ "description": "Allows legend items to wrap onto the next line if the chart is not wide enough.\n\nNote that the chart's SVG height and width are 100% by default, so it can be responsive itself. However, if you\ndefine the height and width of the chart's parent container, you must accommodate for extra legend height due to\nlegend items wrapping onto the next line. When the height of the chart's parent container is too small, some legend\nitems may not be visible.\n\nAlternatively, a callback function may be provided, which will be called after the legend's itemsPerRow property\nhas been calculated. The value provided can be used to increase the chart's parent container height as legend\nitems wrap onto the next line. If no adjustment is necessary, the value will be zero.\n\nNote: This is overridden by the legendItemsPerRow property",
980
+ "defaultValue": "false"
981
+ },
982
+ {
983
+ "name": "legendComponent",
984
+ "type": "React.ReactElement<any>",
985
+ "description": "The legend component to render with chart.",
986
+ "defaultValue": "<ChartLegend />"
987
+ },
988
+ {
989
+ "name": "legendDirection",
990
+ "type": "'ltr' | 'rtl'",
991
+ "description": "Text direction of the legend labels.",
992
+ "defaultValue": "'ltr'"
993
+ },
994
+ {
995
+ "name": "legendItemsPerRow",
996
+ "type": "number",
997
+ "description": "The legendItemsPerRow prop determines how many items to render in each row\nof a horizontal legend, or in each column of a vertical legend. This\nprop should be given as an integer. When this prop is not given,\nlegend items will be rendered in a single row or column."
998
+ },
999
+ {
1000
+ "name": "legendOrientation",
1001
+ "type": "'horizontal' | 'vertical'",
1002
+ "description": "The orientation prop takes a string that defines whether legend data\nare displayed in a row or column. When orientation is \"horizontal\",\nlegend items will be displayed in a single row. When orientation is\n\"vertical\", legend items will be displayed in a single column. Line\nand text-wrapping is not currently supported, so \"vertical\"\norientation is both the default setting and recommended for\ndisplaying many series of data.",
1003
+ "defaultValue": "theme.legend.orientation"
1004
+ },
1005
+ {
1006
+ "name": "legendPosition",
1007
+ "type": "'bottom' | 'bottom-left' | 'right'",
1008
+ "description": "The legend position relation to the chart. Valid values are 'bottom', 'bottom-left', and 'right'\n\nNote: When adding a legend, padding may need to be adjusted in order to accommodate the extra legend. In some\ncases, the legend may not be visible until enough padding is applied.",
1009
+ "defaultValue": "'bottom'"
1010
+ },
1011
+ {
1012
+ "name": "maxDomain",
1013
+ "type": "number | { x?: number; y?: number }",
1014
+ "description": "The maxDomain prop defines a maximum domain value for a chart. This prop is useful in situations where the maximum\ndomain of a chart is static, while the minimum value depends on data or other variable information. If the domain\nprop is set in addition to maximumDomain, domain will be used.\n\nNote: The x value supplied to the maxDomain prop refers to the independent variable, and the y value refers to the\ndependent variable. This may cause confusion in horizontal charts, as the independent variable will corresponds to\nthe y axis.\n\n@example\n\nmaxDomain={0}\nmaxDomain={{ y: 0 }}\n\nNote: The x domain is expected to be `x: 2` in order to position all measures properly"
1015
+ },
1016
+ {
1017
+ "name": "minDomain",
1018
+ "type": "number | { x?: number; y?: number }",
1019
+ "description": "The minDomain prop defines a minimum domain value for a chart. This prop is useful in situations where the minimum\ndomain of a chart is static, while the maximum value depends on data or other variable information. If the domain\nprop is set in addition to minimumDomain, domain will be used.\n\nNote: The x value supplied to the minDomain prop refers to the independent variable, and the y value refers to the\ndependent variable. This may cause confusion in horizontal charts, as the independent variable will corresponds to\nthe y axis.\n\n@example\n\nminDomain={0}\nminDomain={{ y: 0 }}\n\nNote: The x domain is expected to be `x: 0` in order to position all measures properly"
1020
+ },
1021
+ {
1022
+ "name": "name",
1023
+ "type": "string",
1024
+ "description": "The name prop is typically used to reference a component instance when defining shared events. However, this\noptional prop may also be applied to child elements as an ID prefix. This is a workaround to ensure Victory\nbased components output unique IDs when multiple charts appear in a page."
1025
+ },
1026
+ {
1027
+ "name": "padding",
1028
+ "type": "number | { top: number, bottom: number, left: number, right: number }",
1029
+ "description": "The padding props specifies the amount of padding in number of pixels between\nthe edge of the chart and any rendered child components. This prop can be given\nas a number or as an object with padding specified for top, bottom, left\nand right.\n\nNote: The underlying bullet chart is a different size than height and width. For a horizontal chart, left and right\npadding may need to be applied at (approx) 2 to 1 scale."
1030
+ },
1031
+ {
1032
+ "name": "primaryDotMeasureComponent",
1033
+ "type": "React.ReactElement<any>",
1034
+ "description": "The primary dot measure component to render with the chart",
1035
+ "defaultValue": "<ChartBulletPrimaryDotMeasure />"
1036
+ },
1037
+ {
1038
+ "name": "primaryDotMeasureData",
1039
+ "type": "any[]",
1040
+ "description": "The data prop specifies the data to be plotted. Data should be in the form of an array\nof data points, or an array of arrays of data points for multiple datasets.\nEach data point may be any format you wish (depending on the `comparativeErrorMeasureDataY` accessor prop),\nbut by default, an object with y properties is expected.\n\n@example primaryDotMeasureData={[{ y: 50 }]}"
1041
+ },
1042
+ {
1043
+ "name": "primaryDotMeasureDataY",
1044
+ "type": "number | string | Function | string[]",
1045
+ "description": "The primaryDotMeasureDataY prop specifies how to access the Y value of each data point.\nIf given as a function, it will be run on each data point, and returned value will be used.\nIf given as an integer, it will be used as an array index for array-type data points.\nIf given as a string, it will be used as a property key for object-type data points.\nIf given as an array of strings, or a string containing dots or brackets,\nit will be used as a nested object property path (for details see Lodash docs for _.get).\nIf `null` or `undefined`, the data value will be used as is (identity function/pass-through).\n\n\n@example 0, 'y', 'y.value.nested.1.thing', 'y[2].also.nested', null, d => Math.sin(d)"
1046
+ },
1047
+ {
1048
+ "name": "primaryDotMeasureLegendData",
1049
+ "type": "{\n name?: string;\n symbol?: {\n fill?: string;\n type?: string;\n };\n}[]",
1050
+ "description": "Specify data via the data prop. ChartLegend expects data as an\narray of objects with name (required), symbol, and labels properties.\nThe data prop must be given as an array.\n\n@example legendData={[{ name: `GBps capacity - 45%` }, { name: 'Unused' }]}"
1051
+ },
1052
+ {
1053
+ "name": "primarySegmentedMeasureComponent",
1054
+ "type": "React.ReactElement<any>",
1055
+ "description": "The primary segmented measure component to render with the chart",
1056
+ "defaultValue": "<ChartBulletPrimarySegmentedMeasure />"
1057
+ },
1058
+ {
1059
+ "name": "primarySegmentedMeasureData",
1060
+ "type": "any[]",
1061
+ "description": "The data prop specifies the data to be plotted. Data should be in the form of an array\nof data points, or an array of arrays of data points for multiple datasets.\nEach data point may be any format you wish (depending on the `comparativeErrorMeasureDataY` accessor prop),\nbut by default, an object with y properties is expected.\n\n@example primarySegmentedMeasureData={[{ y: 50 }]}"
1062
+ },
1063
+ {
1064
+ "name": "primarySegmentedMeasureDataY",
1065
+ "type": "number | string | Function | string[]",
1066
+ "description": "The primarySegmentedMeasureDataY prop specifies how to access the Y value of each data point.\nIf given as a function, it will be run on each data point, and returned value will be used.\nIf given as an integer, it will be used as an array index for array-type data points.\nIf given as a string, it will be used as a property key for object-type data points.\nIf given as an array of strings, or a string containing dots or brackets,\nit will be used as a nested object property path (for details see Lodash docs for _.get).\nIf `null` or `undefined`, the data value will be used as is (identity function/pass-through).\n\n\n@example 0, 'y', 'y.value.nested.1.thing', 'y[2].also.nested', null, d => Math.sin(d)"
1067
+ },
1068
+ {
1069
+ "name": "primarySegmentedMeasureLegendData",
1070
+ "type": "{\n name?: string;\n symbol?: {\n fill?: string;\n type?: string;\n };\n}[]",
1071
+ "description": "Specify data via the data prop. ChartLegend expects data as an\narray of objects with name (required), symbol, and labels properties.\nThe data prop must be given as an array.\n\n@example legendData={[{ name: `GBps capacity - 45%` }, { name: 'Unused' }]}"
1072
+ },
1073
+ {
1074
+ "name": "qualitativeRangeComponent",
1075
+ "type": "React.ReactElement<any>",
1076
+ "description": "The qualitative range component to render with the chart",
1077
+ "defaultValue": "<ChartBulletQualitativeRange />"
1078
+ },
1079
+ {
1080
+ "name": "qualitativeRangeData",
1081
+ "type": "any[]",
1082
+ "description": "The data prop specifies the data to be plotted. Data should be in the form of an array\nof data points, or an array of arrays of data points for multiple datasets.\nEach data point may be any format you wish (depending on the `comparativeErrorMeasureDataY` accessor prop),\nbut by default, an object with y properties is expected.\n\n@example qualitativeRangeData={[{ y: 50 }]}"
1083
+ },
1084
+ {
1085
+ "name": "qualitativeRangeDataY",
1086
+ "type": "number | string | Function | string[]",
1087
+ "description": "The qualitativeRangeDataY prop specifies how to access the Y value of each data point.\nIf given as a function, it will be run on each data point, and returned value will be used.\nIf given as an integer, it will be used as an array index for array-type data points.\nIf given as a string, it will be used as a property key for object-type data points.\nIf given as an array of strings, or a string containing dots or brackets,\nit will be used as a nested object property path (for details see Lodash docs for _.get).\nIf `null` or `undefined`, the data value will be used as is (identity function/pass-through).\n\n\n@example 0, 'y', 'y.value.nested.1.thing', 'y[2].also.nested', null, d => Math.sin(d)"
1088
+ },
1089
+ {
1090
+ "name": "qualitativeRangeDataY0",
1091
+ "type": "number | string | Function | string[]",
1092
+ "description": "Use qualitativeRangeDataY0 data accessor prop to determine how the component defines the baseline y0 data.\nThis prop is useful for defining custom baselines for components like ChartBar.\nThis prop may be given in a variety of formats.\n\n\n@example 'last_quarter_profit', () => 10, 1, 'employees.salary', [\"employees\", \"salary\"]"
1093
+ },
1094
+ {
1095
+ "name": "qualitativeRangeLegendData",
1096
+ "type": "{\n name?: string;\n symbol?: {\n fill?: string;\n type?: string;\n };\n}[]",
1097
+ "description": "Specify data via the data prop. ChartLegend expects data as an\narray of objects with name (required), symbol, and labels properties.\nThe data prop must be given as an array.\n\n@example legendData={[{ name: `GBps capacity - 45%` }, { name: 'Unused' }]}"
1098
+ },
1099
+ {
1100
+ "name": "standalone",
1101
+ "type": "boolean",
1102
+ "description": "The standalone prop determines whether the component will render a standalone svg\nor a <g> tag that will be included in an external svg. Set standalone to false to\ncompose Chart with other components within an enclosing <svg> tag.",
1103
+ "defaultValue": "true"
1104
+ },
1105
+ {
1106
+ "name": "subTitle",
1107
+ "type": "string",
1108
+ "description": "The subtitle for the chart"
1109
+ },
1110
+ {
1111
+ "name": "theme",
1112
+ "type": "object",
1113
+ "description": "The theme prop specifies a theme to use for determining styles and layout properties for a component. Any styles or\nprops defined in theme may be overwritten by props specified on the component instance.",
1114
+ "defaultValue": "getBulletThemeWithLegendColorScale({\n comparativeErrorMeasureData,\n comparativeErrorMeasureLegendData,\n comparativeWarningMeasureData,\n comparativeWarningMeasureLegendData,\n invert,\n primaryDotMeasureData,\n primaryDotMeasureLegendData,\n primarySegmentedMeasureData,\n primarySegmentedMeasureLegendData,\n qualitativeRangeData,\n qualitativeRangeLegendData,\n themeColor\n})"
1115
+ },
1116
+ {
1117
+ "name": "themeColor",
1118
+ "type": "string",
1119
+ "description": "Specifies the theme color. Valid values are 'blue', 'green', 'multi', etc.\n\nNote: Not compatible with theme prop\n\n@example themeColor={ChartThemeColor.blue}"
1120
+ },
1121
+ {
1122
+ "name": "title",
1123
+ "type": "string",
1124
+ "description": "The title for the chart"
1125
+ },
1126
+ {
1127
+ "name": "titleComponent",
1128
+ "type": "React.ReactElement<any>",
1129
+ "description": "The label component to render the chart title.",
1130
+ "defaultValue": "<ChartBulletTitle />"
1131
+ },
1132
+ {
1133
+ "name": "titlePosition",
1134
+ "type": "'left' | 'top-left'",
1135
+ "description": "The title position relation to the chart. Valid values are 'left', and 'top-left'\n\nNote: These properties are only valid for horizontal layouts"
1136
+ },
1137
+ {
1138
+ "name": "width",
1139
+ "type": "number",
1140
+ "description": "Specifies the width of the svg viewBox of the chart container. This value should be given as a\nnumber of pixels.\n\nBecause Victory renders responsive containers, the width and height props do not determine the width and\nheight of the chart in number of pixels, but instead define an aspect ratio for the chart. The exact number of\npixels will depend on the size of the container the chart is rendered into. Typically, the parent container is set\nto the same width in order to maintain the aspect ratio.",
1141
+ "defaultValue": "horizontal ? theme.chart.width : theme.chart.height"
1142
+ }
1143
+ ]
1144
+ },
1145
+ {
1146
+ "name": "ChartDonut",
1147
+ "description": "ChartDonut renders a dataset as a donut chart.\n\nSee https://github.com/FormidableLabs/victory/blob/main/packages/victory-pie/src/index.d.ts",
1148
+ "props": [
1149
+ {
1150
+ "name": "allowTooltip",
1151
+ "type": "boolean",
1152
+ "description": "Specifies the tooltip capability of the container component. A value of true allows the chart to add a\nChartTooltip component to the labelComponent property. This is a shortcut to display tooltips when the labels\nproperty is also provided.",
1153
+ "defaultValue": "true"
1154
+ },
1155
+ {
1156
+ "name": "animate",
1157
+ "type": "boolean | object",
1158
+ "description": "The animate prop specifies props for VictoryAnimation to use.\nThe animate prop should also be used to specify enter and exit\ntransition configurations with the `onExit` and `onEnter` namespaces respectively.\n\n\n@example\n{duration: 500, onExit: () => {}, onEnter: {duration: 500, before: () => ({y: 0})})}"
1159
+ },
1160
+ {
1161
+ "name": "ariaDesc",
1162
+ "type": "string",
1163
+ "description": "The ariaDesc prop specifies the description of the chart/SVG to assist with\naccessibility for screen readers.\n\nNote: Overridden by the desc prop of containerComponent"
1164
+ },
1165
+ {
1166
+ "name": "ariaTitle",
1167
+ "type": "string",
1168
+ "description": "The ariaTitle prop specifies the title to be applied to the SVG to assist\naccessibility for screen readers.\n\nNote: Overridden by the title prop of containerComponent"
1169
+ },
1170
+ {
1171
+ "name": "capHeight",
1172
+ "type": "number | string | Function",
1173
+ "description": "The capHeight prop defines a text metric for the font being used: the expected height of capital letters.\nThis is necessary because of SVG, which (a) positions the *bottom* of the text at `y`, and (b) has no notion of\nline height. The value should ideally use the same units as `lineHeight` and `dy`, preferably ems. If given a\nunitless number, it is assumed to be ems.",
1174
+ "defaultValue": "1.1"
1175
+ },
1176
+ {
1177
+ "name": "categories",
1178
+ "type": "string[] | { x: string[], y: string[] }",
1179
+ "description": "The categories prop specifies how categorical data for a chart should be ordered.\nThis prop should be given as an array of string values, or an object with\nthese arrays of values specified for x and y. If this prop is not set,\ncategorical data will be plotted in the order it was given in the data array\n\n\n@example [\"dogs\", \"cats\", \"mice\"]"
1180
+ },
1181
+ {
1182
+ "name": "colorScale",
1183
+ "type": "string[]",
1184
+ "description": "The colorScale prop is an optional prop that defines the color scale the pie\nwill be created on. This prop should be given as an array of CSS colors, or as a string\ncorresponding to one of the built in color scales. ChartPie will automatically assign\nvalues from this color scale to the pie slices unless colors are explicitly provided in the\ndata object"
1185
+ },
1186
+ {
1187
+ "name": "constrainToVisibleArea",
1188
+ "type": "boolean",
1189
+ "description": "The constrainToVisibleArea prop determines whether to coerce tooltips so that they fit within the visible area of\nthe chart. When this prop is set to true, tooltip pointers will still point to the correct data point, but the\ncenter of the tooltip will be shifted to fit within the overall width and height of the svg Victory renders."
1190
+ },
1191
+ {
1192
+ "name": "containerComponent",
1193
+ "type": "React.ReactElement<any>",
1194
+ "description": "The containerComponent prop takes an entire component which will be used to\ncreate a container element for standalone charts.\nThe new element created from the passed containerComponent wil be provided with\nthese props from ChartPie: height, width, children\n(the chart itself) and style. Props that are not provided by the\nchild chart component include title and desc, both of which\nare intended to add accessibility to Victory components. The more descriptive these props\nare, the more accessible your data will be for people using screen readers.\nAny of these props may be overridden by passing in props to the supplied component,\nor modified or ignored within the custom component itself. If a dataComponent is\nnot provided, ChartPie will use the default ChartContainer component.\n\n@example <ChartContainer title=\"Chart of Dog Breeds\" desc=\"This chart shows ...\" />",
1195
+ "defaultValue": "<ChartContainer />"
1196
+ },
1197
+ {
1198
+ "name": "cornerRadius",
1199
+ "type": "number | Function",
1200
+ "description": "Set the cornerRadius for every dataComponent (Slice by default) within ChartPie"
1201
+ },
1202
+ {
1203
+ "name": "data",
1204
+ "type": "any[]",
1205
+ "description": "The data prop specifies the data to be plotted,\nwhere data X-value is the slice label (string or number),\nand Y-value is the corresponding number value represented by the slice\nData should be in the form of an array of data points.\nEach data point may be any format you wish (depending on the `x` and `y` accessor props),\nbut by default, an object with x and y properties is expected.\n\n@example [{x: 1, y: 2}, {x: 2, y: 3}], [[1, 2], [2, 3]],\n[[{x: \"a\", y: 1}, {x: \"b\", y: 2}], [{x: \"a\", y: 2}, {x: \"b\", y: 3}]]"
1206
+ },
1207
+ {
1208
+ "name": "dataComponent",
1209
+ "type": "React.ReactElement<any>",
1210
+ "description": "The dataComponent prop takes an entire, HTML-complete data component which will be used to\ncreate slices for each datum in the pie chart. The new element created from the passed\ndataComponent will have the property datum set by the pie chart for the point it renders;\nproperties style and pathFunction calculated by ChartPie; an index property set\ncorresponding to the location of the datum in the data provided to the pie; events bound to\nthe ChartPie; and the d3 compatible slice object.\nIf a dataComponent is not provided, ChartPie's Slice component will be used."
1211
+ },
1212
+ {
1213
+ "name": "endAngle",
1214
+ "type": "number",
1215
+ "description": "The overall end angle of the pie in degrees. This prop is used in conjunction with\nstartAngle to create a pie that spans only a segment of a circle."
1216
+ },
1217
+ {
1218
+ "name": "eventKey",
1219
+ "type": "number | string | Function",
1220
+ "description": "Similar to data accessor props `x` and `y`, this prop may be used to functionally\nassign eventKeys to data"
1221
+ },
1222
+ {
1223
+ "name": "events",
1224
+ "type": "object[]",
1225
+ "description": "The event prop takes an array of event objects. Event objects are composed of\na target, an eventKey, and eventHandlers. Targets may be any valid style namespace\nfor a given component, so \"data\" and \"labels\" are all valid targets for ChartPie\nevents. The eventKey may optionally be used to select a single element by index rather than\nan entire set. The eventHandlers object should be given as an object whose keys are standard\nevent names (i.e. onClick) and whose values are event callbacks. The return value\nof an event handler is used to modify elements. The return value should be given\nas an object or an array of objects with optional target and eventKey keys,\nand a mutation key whose value is a function. The target and eventKey keys\nwill default to those corresponding to the element the event handler was attached to.\nThe mutation function will be called with the calculated props for the individual selected\nelement (i.e. a single bar), and the object returned from the mutation function\nwill override the props of the selected element via object assignment.\n\n\n@example\nevents={[\n {\n target: \"data\",\n eventKey: 1,\n eventHandlers: {\n onClick: () => {\n return [\n {\n eventKey: 2,\n mutation: (props) => {\n return {style: merge({}, props.style, {fill: \"orange\"})};\n }\n }, {\n eventKey: 2,\n target: \"labels\",\n mutation: () => {\n return {text: \"hey\"};\n }\n }\n ];\n }\n }\n }\n]}"
1226
+ },
1227
+ {
1228
+ "name": "externalEventMutations",
1229
+ "type": "object[]",
1230
+ "description": "ChartPie uses the standard externalEventMutations prop."
1231
+ },
1232
+ {
1233
+ "name": "groupComponent",
1234
+ "type": "React.ReactElement<any>",
1235
+ "description": "The groupComponent prop takes an entire component which will be used to\ncreate group elements for use within container elements. This prop defaults\nto a <g> tag on web, and a react-native-svg <G> tag on mobile"
1236
+ },
1237
+ {
1238
+ "name": "hasPatterns",
1239
+ "type": "boolean | boolean[]",
1240
+ "description": "The hasPatterns prop is an optional prop that indicates whether a pattern is shown for a chart.\nSVG patterns are dynamically generated (unique to each chart) in order to apply colors from the selected\ncolor theme or custom color scale. Those generated patterns are applied in a specific order (via a URL), similar\nto the color theme ordering defined by PatternFly. If the multi-color theme was in use; for example, colorized\npatterns would be displayed in that same order. Create custom patterns via the patternScale prop.\n\nNote: Not all components are supported; for example, ChartLine, ChartBullet, ChartThreshold, etc.\n\n@example hasPatterns={ true }\n@example hasPatterns={[ true, true, false ]}"
1241
+ },
1242
+ {
1243
+ "name": "height",
1244
+ "type": "number",
1245
+ "description": "Specifies the height the svg viewBox of the chart container. This value should be given as a\nnumber of pixels.\n\nBecause Victory renders responsive containers, the width and height props do not determine the width and\nheight of the chart in number of pixels, but instead define an aspect ratio for the chart. The exact number of\npixels will depend on the size of the container the chart is rendered into.\n\nNote: When adding a legend, height (the overall SVG height) may need to be larger than pieHeight (the pie size)\nin order to accommodate the extra legend.\n\nBy default, pieHeight is the min. of either height or width. This covers most use cases in order to accommodate\nlegends within the same SVG. However, pieHeight (not height) may need to be set in order to adjust the pie height.\n\nTypically, the parent container is set to the same width in order to maintain the aspect ratio.",
1246
+ "defaultValue": "theme.pie.height"
1247
+ },
1248
+ {
1249
+ "name": "innerRadius",
1250
+ "type": "number | Function",
1251
+ "description": "When creating a donut chart, this prop determines the number of pixels between\nthe center of the chart and the inner edge. When this prop is set to zero\na regular pie chart is rendered."
1252
+ },
1253
+ {
1254
+ "name": "labelComponent",
1255
+ "type": "React.ReactElement<any>",
1256
+ "description": "The labelComponent prop takes in an entire label component which will be used\nto create a label for the area. The new element created from the passed labelComponent\nwill be supplied with the following properties: x, y, index, data, verticalAnchor,\ntextAnchor, angle, style, text, and events. any of these props may be overridden\nby passing in props to the supplied component, or modified or ignored within\nthe custom component itself. If labelComponent is omitted, a new ChartLabel\nwill be created with props described above. This labelComponent prop should be used to\nprovide a series label for ChartPie. If individual labels are required for each\ndata point, they should be created by composing ChartPie with VictoryScatter"
1257
+ },
1258
+ {
1259
+ "name": "labelPosition",
1260
+ "type": "string | Function",
1261
+ "description": "The labelPosition prop specifies the angular position of each label relative to its corresponding slice.\nThis prop should be given as \"startAngle\", \"endAngle\", \"centroid\", or as a function that returns one of these\nvalues. When this prop is not given, the label will be positioned at the centroid of each slice."
1262
+ },
1263
+ {
1264
+ "name": "labelRadius",
1265
+ "type": "number | Function",
1266
+ "description": "The labelRadius prop defines the radius of the arc that will be used for positioning each slice label.\nIf this prop is not set, the label radius will default to the radius of the pie + label padding."
1267
+ },
1268
+ {
1269
+ "name": "labels",
1270
+ "type": "string[] | number[] | ((data: any) => string | number | null)",
1271
+ "description": "The labels prop defines labels that will appear above each bar in your chart.\nThis prop should be given as an array of values or as a function of data.\nIf given as an array, the number of elements in the array should be equal to\nthe length of the data array. Labels may also be added directly to the data object\nlike data={[{x: 1, y: 1, label: \"first\"}]}.\n\n@example [\"spring\", \"summer\", \"fall\", \"winter\"], (datum) => datum.title"
1272
+ },
1273
+ {
1274
+ "name": "legendAllowWrap",
1275
+ "type": "boolean | ((extraHeight: number) => void)",
1276
+ "description": "Allows legend items to wrap onto the next line if the chart is not wide enough.\n\nNote that the chart's SVG height and width are 100% by default, so it can be responsive itself. However, if you\ndefine the height and width of the chart's parent container, you must accommodate for extra legend height due to\nlegend items wrapping onto the next line. When the height of the chart's parent container is too small, some legend\nitems may not be visible.\n\nAlternatively, a callback function may be provided, which will be called after the legend's itemsPerRow property\nhas been calculated. The value provided can be used to increase the chart's parent container height as legend\nitems wrap onto the next line. If no adjustment is necessary, the value will be zero.\n\nNote: This is overridden by the legendItemsPerRow property"
1277
+ },
1278
+ {
1279
+ "name": "legendComponent",
1280
+ "type": "React.ReactElement<any>",
1281
+ "description": "The legend component to render with chart.\n\nNote: Use legendData so the legend width can be calculated and positioned properly.\nDefault legend properties may be applied"
1282
+ },
1283
+ {
1284
+ "name": "legendData",
1285
+ "type": "{\n name?: string;\n symbol?: {\n fill?: string;\n type?: string;\n };\n}[]",
1286
+ "description": "Specify data via the data prop. ChartLegend expects data as an\narray of objects with name (required), symbol, and labels properties.\nThe data prop must be given as an array.\n\n@example legendData={[{ name: `GBps capacity - 45%` }, { name: 'Unused' }]}"
1287
+ },
1288
+ {
1289
+ "name": "legendDirection",
1290
+ "type": "'ltr' | 'rtl'",
1291
+ "description": "Text direction of the legend labels.",
1292
+ "defaultValue": "'ltr'"
1293
+ },
1294
+ {
1295
+ "name": "legendOrientation",
1296
+ "type": "'horizontal' | 'vertical'",
1297
+ "description": "The orientation prop takes a string that defines whether legend data\nare displayed in a row or column. When orientation is \"horizontal\",\nlegend items will be displayed in a single row. When orientation is\n\"vertical\", legend items will be displayed in a single column. Line\nand text-wrapping is not currently supported, so \"vertical\"\norientation is both the default setting and recommended for\ndisplaying many series of data."
1298
+ },
1299
+ {
1300
+ "name": "legendPosition",
1301
+ "type": "'bottom' | 'right'",
1302
+ "description": "The legend position relation to the pie chart. Valid values are 'bottom' and 'right'\n\nNote: When adding a legend, padding may need to be adjusted in order to accommodate the extra legend. In some\ncases, the legend may not be visible until enough padding is applied.",
1303
+ "defaultValue": "\"right\""
1304
+ },
1305
+ {
1306
+ "name": "name",
1307
+ "type": "string",
1308
+ "description": "The name prop is typically used to reference a component instance when defining shared events. However, this\noptional prop may also be applied to child elements as an ID prefix. This is a workaround to ensure Victory\nbased components output unique IDs when multiple charts appear in a page."
1309
+ },
1310
+ {
1311
+ "name": "origin",
1312
+ "type": "{ x: number, y: number }",
1313
+ "description": "Victory components will pass an origin prop is to define the center point in svg coordinates for polar charts.\n\nNote: It will not typically be necessary to set an origin prop manually"
1314
+ },
1315
+ {
1316
+ "name": "padAngle",
1317
+ "type": "number | Function",
1318
+ "description": "The padAngle prop determines the amount of separation between adjacent data slices\nin number of degrees"
1319
+ },
1320
+ {
1321
+ "name": "padding",
1322
+ "type": "number | { top: number, bottom: number, left: number, right: number }",
1323
+ "description": "The padding props specifies the amount of padding in number of pixels between\nthe edge of the chart and any rendered child components. This prop can be given\nas a number or as an object with padding specified for top, bottom, left\nand right."
1324
+ },
1325
+ {
1326
+ "name": "patternScale",
1327
+ "type": "string[]",
1328
+ "description": "The patternScale prop is an optional prop that defines patterns to apply, where applicable. This prop should be\ngiven as a string array of pattern URLs. Patterns will be assigned to children by index and will repeat when there\nare more children than patterns in the provided patternScale. Use null to omit the pattern for a given index.\n\nNote: Not all components are supported; for example, ChartLine, ChartBullet, ChartThreshold, etc.\n\n@example patternScale={[ 'url(\"#pattern1\")', 'url(\"#pattern2\")', null ]}"
1329
+ },
1330
+ {
1331
+ "name": "radius",
1332
+ "type": "number | Function",
1333
+ "description": "Specifies the radius of the chart. If this property is not provided it is computed\nfrom width, height, and padding props"
1334
+ },
1335
+ {
1336
+ "name": "sortKey",
1337
+ "type": "number | string | Function | string[]",
1338
+ "description": "Use the sortKey prop to indicate how data should be sorted. This prop\nis given directly to the lodash sortBy function to be executed on the final dataset."
1339
+ },
1340
+ {
1341
+ "name": "sortOrder",
1342
+ "type": "string",
1343
+ "description": "The sortOrder prop specifies whether sorted data should be returned in 'ascending' or 'descending' order."
1344
+ },
1345
+ {
1346
+ "name": "standalone",
1347
+ "type": "boolean",
1348
+ "description": "The standalone prop determines whether the component will render a standalone svg\nor a <g> tag that will be included in an external svg. Set standalone to false to\ncompose ChartPie with other components within an enclosing <svg> tag.",
1349
+ "defaultValue": "true"
1350
+ },
1351
+ {
1352
+ "name": "startAngle",
1353
+ "type": "number",
1354
+ "description": "The overall start angle of the pie in degrees. This prop is used in conjunction with\nendAngle to create a pie that spans only a segment of a circle."
1355
+ },
1356
+ {
1357
+ "name": "style",
1358
+ "type": "{ parent: object, data: object, labels: object }",
1359
+ "description": "The style prop specifies styles for your pie. ChartPie relies on Radium,\nso valid Radium style objects should work for this prop. Height, width, and\npadding should be specified via the height, width, and padding props.\n\n\n@example {data: {stroke: \"black\"}, label: {fontSize: 10}}"
1360
+ },
1361
+ {
1362
+ "name": "subTitle",
1363
+ "type": "string",
1364
+ "description": "The subtitle for the donut chart"
1365
+ },
1366
+ {
1367
+ "name": "subTitleComponent",
1368
+ "type": "React.ReactElement<any>",
1369
+ "description": "The label component to render the chart subTitle.\n\nWhen overriding the subTitleComponent prop, title and subTitle will be centered independently. You may choose to\nuse the x and y props of ChartLabel to adjust the center position. For example:\n\n<pre>\nsubTitle=\"Pets\"\nsubTitleComponent={<ChartLabel y={130} />}\ntitle={100}\ntitleComponent={<ChartLabel y={107} />}\n</pre>\n\nNote: Default label properties may be applied"
1370
+ },
1371
+ {
1372
+ "name": "subTitlePosition",
1373
+ "type": "'bottom' | 'center' | 'right'",
1374
+ "description": "The orientation of the subtitle position. Valid values are 'bottom', 'center', and 'right'",
1375
+ "defaultValue": "\"center\""
1376
+ },
1377
+ {
1378
+ "name": "theme",
1379
+ "type": "object",
1380
+ "description": "The theme prop takes a style object with nested data, labels, and parent objects.\nYou can create this object yourself, or you can use a theme provided by\nWhen using ChartPie as a solo component, implement the theme directly on\nChartPie. If you are wrapping ChartPie in ChartChart or ChartGroup,\nplease call the theme on the outermost wrapper component instead.",
1381
+ "defaultValue": "getDonutTheme(themeColor)"
1382
+ },
1383
+ {
1384
+ "name": "themeColor",
1385
+ "type": "string",
1386
+ "description": "Specifies the theme color. Valid values are 'blue', 'green', 'multi', etc.\n\nNote: Not compatible with theme prop\n\n@example themeColor={ChartThemeColor.blue}"
1387
+ },
1388
+ {
1389
+ "name": "title",
1390
+ "type": "string",
1391
+ "description": "The title for the donut chart"
1392
+ },
1393
+ {
1394
+ "name": "titleComponent",
1395
+ "type": "React.ReactElement<any>",
1396
+ "description": "The label component to render the chart title.\n\nWhen centering both title and subTitle props, it's possible to override both styles via an array provided to\nChartLabel. The first item in the array is associated with title styles, while the second item in the array is\nassociated with subtitle styles.\n\n<pre>\nsubTitle=\"Pets\"\ntitle={100}\ntitleComponent={\n <ChartLabel style={[{\n fill: 'red', // title color\n fontSize: 24\n }, {\n fill: 'blue', // subtitle color\n fontSize: 14\n }]}\n />\n}\n</pre>\n\nIn this case, both title and subTitle will be centered together. However, should you also override the\nsubTitleComponent prop, title and subTitle will be centered independently. You may choose to\nuse the x and y props of ChartLabel to adjust the center position. For example:\n\n<pre>\nsubTitle=\"Pets\"\nsubTitleComponent={<ChartLabel y={130} />}\ntitle={100}\ntitleComponent={<ChartLabel y={107} />}\n</pre>\n\nNote: Default label properties may be applied",
1397
+ "defaultValue": "<ChartLabel />"
1398
+ },
1399
+ {
1400
+ "name": "width",
1401
+ "type": "number",
1402
+ "description": "Specifies the width of the svg viewBox of the chart container. This value should be given as a number of pixels.\n\nBecause Victory renders responsive containers, the width and height props do not determine the width and\nheight of the chart in number of pixels, but instead define an aspect ratio for the chart. The exact number of\npixels will depend on the size of the container the chart is rendered into. Typically, the parent container is set\nto the same width in order to maintain the aspect ratio.",
1403
+ "defaultValue": "theme.pie.width"
1404
+ },
1405
+ {
1406
+ "name": "x",
1407
+ "type": "number | string | Function | string[]",
1408
+ "description": "The x prop specifies how to access the X value of each data point.\nIf given as a function, it will be run on each data point, and returned value will be used.\nIf given as an integer, it will be used as an array index for array-type data points.\nIf given as a string, it will be used as a property key for object-type data points.\nIf given as an array of strings, or a string containing dots or brackets,\nit will be used as a nested object property path (for details see Lodash docs for _.get).\nIf `null` or `undefined`, the data value will be used as is (identity function/pass-through).\n\n\n@example 0, 'x', 'x.value.nested.1.thing', 'x[2].also.nested', null, d => Math.sin(d)"
1409
+ },
1410
+ {
1411
+ "name": "y",
1412
+ "type": "number | string | Function | string[]",
1413
+ "description": "The y prop specifies how to access the Y value of each data point.\nIf given as a function, it will be run on each data point, and returned value will be used.\nIf given as an integer, it will be used as an array index for array-type data points.\nIf given as a string, it will be used as a property key for object-type data points.\nIf given as an array of strings, or a string containing dots or brackets,\nit will be used as a nested object property path (for details see Lodash docs for _.get).\nIf `null` or `undefined`, the data value will be used as is (identity function/pass-through).\n\n\n@example 0, 'y', 'y.value.nested.1.thing', 'y[2].also.nested', null, d => Math.sin(d)"
1414
+ }
1415
+ ]
1416
+ },
1417
+ {
1418
+ "name": "ChartGroup",
1419
+ "description": "ChartGroup is a wrapper component that renders a given set of children with some shared props. ChartGroup reconciles\nthe domain and layout for all its children, and coordinates animations and shared events. ChartGroup may also be used\nto supply common data and styles to all its children. This is especially useful when adding markers to a line, or\nadding voronoi tooltips to data. ChartGroup may also be used to apply an offset to a group of children, as with\ngrouped bar charts, or may be used to stack several components on the same level, e.g., stacked area charts with\ndata markers.\n\nSee https://github.com/FormidableLabs/victory/blob/main/packages/victory-group/src/index.d.ts",
1420
+ "props": [
1421
+ {
1422
+ "name": "animate",
1423
+ "type": "boolean | object",
1424
+ "description": "The animate prop specifies props for VictoryAnimation to use.\nThe animate prop should also be used to specify enter and exit\ntransition configurations with the `onExit` and `onEnter` namespaces respectively.\n\n\n@example\n{duration: 500, onExit: () => {}, onEnter: {duration: 500, before: () => ({y: 0})})}"
1425
+ },
1426
+ {
1427
+ "name": "ariaDesc",
1428
+ "type": "string",
1429
+ "description": "The ariaDesc prop specifies the description of the chart/SVG to assist with\naccessibility for screen readers.\n\nNote: Overridden by the desc prop of containerComponent"
1430
+ },
1431
+ {
1432
+ "name": "ariaTitle",
1433
+ "type": "string",
1434
+ "description": "The ariaTitle prop specifies the title to be applied to the SVG to assist\naccessibility for screen readers.\n\nNote: Overridden by the title prop of containerComponent"
1435
+ },
1436
+ {
1437
+ "name": "categories",
1438
+ "type": "string[] | { x: string[], y: string[] }",
1439
+ "description": "The categories prop specifies how categorical data for a chart should be ordered.\nThis prop should be given as an array of string values, or an object with\nthese arrays of values specified for x and y. If this prop is not set,\ncategorical data will be plotted in the order it was given in the data array\n\n\n@example [\"dogs\", \"cats\", \"mice\"]"
1440
+ },
1441
+ {
1442
+ "name": "children",
1443
+ "type": "React.ReactNode | React.ReactNode[]",
1444
+ "description": "The children to render with the chart"
1445
+ },
1446
+ {
1447
+ "name": "color",
1448
+ "type": "string",
1449
+ "description": "The color prop is an optional prop that defines a single color to be applied to the\nchildren of ChartGroup. The color prop will override colors specified via colorScale."
1450
+ },
1451
+ {
1452
+ "name": "colorScale",
1453
+ "type": "string[]",
1454
+ "description": "The colorScale prop is an optional prop that defines the color scale the chart's bars\nwill be created on. This prop should be given as an array of CSS colors, or as a string\ncorresponding to one of the built in color scales. ChartGroup will automatically assign\nvalues from this color scale to the bars unless colors are explicitly provided in the\n`dataAttributes` prop."
1455
+ },
1456
+ {
1457
+ "name": "containerComponent",
1458
+ "type": "React.ReactElement<any>",
1459
+ "description": "The containerComponent prop takes an entire component which will be used to\ncreate a container element for standalone charts.\nThe new element created from the passed containerComponent wil be provided with\nthese props from ChartGroup: height, width, children\n(the chart itself) and style. Props that are not provided by the\nchild chart component include title and desc, both of which\nare intended to add accessibility to Victory components. The more descriptive these props\nare, the more accessible your data will be for people using screen readers.\nAny of these props may be overridden by passing in props to the supplied component,\nor modified or ignored within the custom component itself. If a dataComponent is\nnot provided, ChartGroup will use the default ChartContainer component.\n\n@example <ChartContainer title=\"Chart of Dog Breeds\" desc=\"This chart shows...\" />",
1460
+ "defaultValue": "<ChartContainer />"
1461
+ },
1462
+ {
1463
+ "name": "data",
1464
+ "type": "any[]",
1465
+ "description": "The data prop specifies the data to be plotted. Data should be in the form of an array\nof data points, or an array of arrays of data points for multiple datasets.\nEach data point may be any format you wish (depending on the `x` and `y` accessor props),\nbut by default, an object with x and y properties is expected.\n\n@example [{x: 1, y: 2}, {x: 2, y: 3}], [[1, 2], [2, 3]],\n[[{x: \"a\", y: 1}, {x: \"b\", y: 2}], [{x: \"a\", y: 2}, {x: \"b\", y: 3}]]"
1466
+ },
1467
+ {
1468
+ "name": "domain",
1469
+ "type": "number[] | { x: number[], y: number[] }",
1470
+ "description": "The domain prop describes the range of values your chart will cover. This prop can be\ngiven as a array of the minimum and maximum expected values for your bar chart,\nor as an object that specifies separate arrays for x and y.\nIf this prop is not provided, a domain will be calculated from data, or other\navailable information.\n\n\n@example [low, high], { x: [low, high], y: [low, high] }\n\n[-1, 1], {x: [0, 100], y: [0, 1]}"
1471
+ },
1472
+ {
1473
+ "name": "domainPadding",
1474
+ "type": "number | number[] | { x: number[], y: number[] }",
1475
+ "description": "The domainPadding prop specifies a number of pixels of padding to add to the\nbeginning and end of a domain. This prop is useful for explicitly spacing ticks farther\nfrom the origin to prevent crowding. This prop should be given as an object with\nnumbers specified for x and y.\n\n\n@example [left, right], { x: [left, right], y: [bottom, top] }\n\n{x: [10, -10], y: 5}"
1476
+ },
1477
+ {
1478
+ "name": "eventKey",
1479
+ "type": "number | string | Function",
1480
+ "description": "Similar to data accessor props `x` and `y`, this prop may be used to functionally\nassign eventKeys to data"
1481
+ },
1482
+ {
1483
+ "name": "events",
1484
+ "type": "object[]",
1485
+ "description": "The event prop take an array of event objects. Event objects are composed of\na target, an eventKey, and eventHandlers. Targets may be any valid style namespace\nfor a given component, so \"data\" and \"labels\" are all valid targets for ChartGroup events.\nSince ChartGroup only renders a single element, the eventKey property is not used.\nThe eventHandlers object should be given as an object whose keys are standard\nevent names (i.e. onClick) and whose values are event callbacks. The return value\nof an event handler is used to modify elements. The return value should be given\nas an object or an array of objects with optional target and eventKey keys,\nand a mutation key whose value is a function. The target and eventKey keys\nwill default to those corresponding to the element the event handler was attached to.\nThe mutation function will be called with the calculated props for the individual selected\nelement (i.e. an area), and the object returned from the mutation function\nwill override the props of the selected element via object assignment.\n\n\n@example\nevents={[\n {\n target: \"data\",\n eventHandlers: {\n onClick: () => {\n return [\n {\n mutation: (props) => {\n return {style: merge({}, props.style, {fill: \"orange\"})};\n }\n }, {\n target: \"labels\",\n mutation: () => {\n return {text: \"hey\"};\n }\n }\n ];\n }\n }\n }\n]}"
1486
+ },
1487
+ {
1488
+ "name": "externalEventMutations",
1489
+ "type": "object[]",
1490
+ "description": "ChartGroup uses the standard externalEventMutations prop."
1491
+ },
1492
+ {
1493
+ "name": "groupComponent",
1494
+ "type": "React.ReactElement<any>",
1495
+ "description": "The groupComponent prop takes an entire component which will be used to\ncreate group elements for use within container elements. This prop defaults\nto a <g> tag on web, and a react-native-svg <G> tag on mobile"
1496
+ },
1497
+ {
1498
+ "name": "hasPatterns",
1499
+ "type": "boolean | boolean[]",
1500
+ "description": "The hasPatterns prop is an optional prop that indicates whether a pattern is shown for a chart.\nSVG patterns are dynamically generated (unique to each chart) in order to apply colors from the selected\ncolor theme or custom color scale. Those generated patterns are applied in a specific order (via a URL), similar\nto the color theme ordering defined by PatternFly. If the multi-color theme was in use; for example, colorized\npatterns would be displayed in that same order. Create custom patterns via the patternScale prop.\n\nNote: Not all components are supported; for example, ChartLine, ChartBullet, ChartThreshold, etc.\n\n@example hasPatterns={ true }\n@example hasPatterns={[ true, true, false ]}"
1501
+ },
1502
+ {
1503
+ "name": "height",
1504
+ "type": "number",
1505
+ "description": "The height props specifies the height the svg viewBox of the chart container.\nThis value should be given as a number of pixels"
1506
+ },
1507
+ {
1508
+ "name": "horizontal",
1509
+ "type": "boolean",
1510
+ "description": "The horizontal prop determines whether data will be plotted horizontally.\nWhen this prop is set to true, the independent variable will be plotted on the y axis\nand the dependent variable will be plotted on the x axis."
1511
+ },
1512
+ {
1513
+ "name": "labelComponent",
1514
+ "type": "React.ReactElement<any>",
1515
+ "description": "The labelComponent prop takes in an entire label component which will be used\nto create a label for the area. The new element created from the passed labelComponent\nwill be supplied with the following properties: x, y, index, data, verticalAnchor,\ntextAnchor, angle, style, text, and events. any of these props may be overridden\nby passing in props to the supplied component, or modified or ignored within\nthe custom component itself. If labelComponent is omitted, a new ChartLabel\nwill be created with props described above. This labelComponent prop should be used to\nprovide a series label for ChartGroup. If individual labels are required for each\ndata point, they should be created by composing ChartGroup with VictoryScatter"
1516
+ },
1517
+ {
1518
+ "name": "labels",
1519
+ "type": "string[] | number[] | ((data: any) => string | number | null)",
1520
+ "description": "The labels prop defines labels that will appear above each bar in your chart.\nThis prop should be given as an array of values or as a function of data.\nIf given as an array, the number of elements in the array should be equal to\nthe length of the data array. Labels may also be added directly to the data object\nlike data={[{x: 1, y: 1, label: \"first\"}]}.\n\n@example [\"spring\", \"summer\", \"fall\", \"winter\"], (datum) => datum.title"
1521
+ },
1522
+ {
1523
+ "name": "maxDomain",
1524
+ "type": "number | { x?: number; y?: number }",
1525
+ "description": "The maxDomain prop defines a maximum domain value for a chart. This prop is useful in situations where the maximum\ndomain of a chart is static, while the minimum value depends on data or other variable information. If the domain\nprop is set in addition to maximumDomain, domain will be used.\n\nNote: The x value supplied to the maxDomain prop refers to the independent variable, and the y value refers to the\ndependent variable. This may cause confusion in horizontal charts, as the independent variable will corresponds to\nthe y axis.\n\n@example\n\nmaxDomain={0}\nmaxDomain={{ y: 0 }}"
1526
+ },
1527
+ {
1528
+ "name": "minDomain",
1529
+ "type": "number | { x?: number; y?: number }",
1530
+ "description": "The minDomain prop defines a minimum domain value for a chart. This prop is useful in situations where the minimum\ndomain of a chart is static, while the maximum value depends on data or other variable information. If the domain\nprop is set in addition to minimumDomain, domain will be used.\n\nNote: The x value supplied to the minDomain prop refers to the independent variable, and the y value refers to the\ndependent variable. This may cause confusion in horizontal charts, as the independent variable will corresponds to\nthe y axis.\n\n@example\n\nminDomain={0}\nminDomain={{ y: 0 }}"
1531
+ },
1532
+ {
1533
+ "name": "name",
1534
+ "type": "string",
1535
+ "description": "The name prop is used to reference a component instance when defining shared events."
1536
+ },
1537
+ {
1538
+ "name": "offset",
1539
+ "type": "number",
1540
+ "description": "The offset prop determines the number of pixels each element in a group should\nbe offset from its original position of the on the independent axis. In the\ncase of groups of bars, this number should be equal to the width of the bar\nplus the desired spacing between bars."
1541
+ },
1542
+ {
1543
+ "name": "origin",
1544
+ "type": "{ x: number, y: number }",
1545
+ "description": "Victory components will pass an origin prop is to define the center point in svg coordinates for polar charts.\n\nNote: It will not typically be necessary to set an origin prop manually"
1546
+ },
1547
+ {
1548
+ "name": "padding",
1549
+ "type": "number | { top: number, bottom: number, left: number, right: number }",
1550
+ "description": "The padding props specifies the amount of padding in number of pixels between\nthe edge of the chart and any rendered child components. This prop can be given\nas a number or as an object with padding specified for top, bottom, left\nand right."
1551
+ },
1552
+ {
1553
+ "name": "patternScale",
1554
+ "type": "string[]",
1555
+ "description": "The patternScale prop is an optional prop that defines patterns to apply, where applicable. This prop should be\ngiven as a string array of pattern URLs. Patterns will be assigned to children by index and will repeat when there\nare more children than patterns in the provided patternScale. Use null to omit the pattern for a given index.\n\nNote: Not all components are supported; for example, ChartLine, ChartBullet, ChartThreshold, etc.\n\n@example patternScale={[ 'url(\"#pattern1\")', 'url(\"#pattern2\")', null ]}"
1556
+ },
1557
+ {
1558
+ "name": "polar",
1559
+ "type": "boolean",
1560
+ "description": "Victory components can pass a boolean polar prop to specify whether a label is part of a polar chart."
1561
+ },
1562
+ {
1563
+ "name": "range",
1564
+ "type": "number[] | { x: number[], y: number[] }",
1565
+ "description": "The range prop describes the dimensions over which data may be plotted. For cartesian coordinate systems, this\ncorresponds to minimum and maximum svg coordinates in the x and y dimension. In polar coordinate systems this\ncorresponds to a range of angles and radii. When this value is not given it will be calculated from the width,\nheight, and padding, or from the startAngle and endAngle in the case of polar charts. All components in a given\nchart must share the same range, so setting this prop on children nested within Chart,\nChartGroup will have no effect. This prop is usually not set manually.\n\n\n@example [low, high] | { x: [low, high], y: [low, high] }\n\nCartesian: range={{ x: [50, 250], y: [50, 250] }}\nPolar: range={{ x: [0, 360], y: [0, 250] }}"
1566
+ },
1567
+ {
1568
+ "name": "samples",
1569
+ "type": "number",
1570
+ "description": "The samples prop specifies how many individual points to plot when plotting\ny as a function of x. Samples is ignored if x props are provided instead."
1571
+ },
1572
+ {
1573
+ "name": "scale",
1574
+ "type": "string | { x: string, y: string }",
1575
+ "description": "The scale prop determines which scales your chart should use. This prop can be\ngiven as a string specifying a supported scale (\"linear\", \"time\", \"log\", \"sqrt\"),\nas a d3 scale function, or as an object with scales specified for x and y\n\n\n@example d3Scale.time(), {x: \"linear\", y: \"log\"}"
1576
+ },
1577
+ {
1578
+ "name": "singleQuadrantDomainPadding",
1579
+ "type": "boolean | { x?: boolean; y?: boolean }",
1580
+ "description": "By default domainPadding is coerced to existing quadrants. This means that if a given domain only includes positive\nvalues, no amount of padding applied by domainPadding will result in a domain with negative values. This is the\ndesired behavior in most cases. For users that need to apply padding without regard to quadrant, the\nsingleQuadrantDomainPadding prop may be used. This prop may be given as a boolean or an object with boolean values\nspecified for \"x\" and/or \"y\". When this prop is false (or false for a given dimension), padding will be applied\nwithout regard to quadrant. If this prop is not specified, domainPadding will be coerced to existing quadrants.\n\nNote: The x value supplied to the singleQuadrantDomainPadding prop refers to the independent variable, and the y\nvalue refers to the dependent variable. This may cause confusion in horizontal charts, as the independent variable\nwill corresponds to the y axis.\n\n@example\n\nsingleQuadrantDomainPadding={false}\nsingleQuadrantDomainPadding={{ x: false }}"
1581
+ },
1582
+ {
1583
+ "name": "sortKey",
1584
+ "type": "number | string | Function | string[]",
1585
+ "description": "Use the sortKey prop to indicate how data should be sorted. This prop\nis given directly to the lodash sortBy function to be executed on the\nfinal dataset."
1586
+ },
1587
+ {
1588
+ "name": "sortOrder",
1589
+ "type": "string",
1590
+ "description": "The sortOrder prop specifies whether sorted data should be returned in 'ascending' or 'descending' order."
1591
+ },
1592
+ {
1593
+ "name": "standalone",
1594
+ "type": "boolean",
1595
+ "description": "The standalone prop determines whether the component will render a standalone svg\nor a <g> tag that will be included in an external svg. Set standalone to false to\ncompose ChartGroup with other components within an enclosing <svg> tag."
1596
+ },
1597
+ {
1598
+ "name": "style",
1599
+ "type": "{ parent: object, data: object, labels: object }",
1600
+ "description": "The style prop specifies styles for your ChartGroup. Any valid inline style properties\nwill be applied. Height, width, and padding should be specified via the height,\nwidth, and padding props, as they are used to calculate the alignment of\ncomponents within chart.\n\n\n@example {data: {fill: \"red\"}, labels: {fontSize: 12}}"
1601
+ },
1602
+ {
1603
+ "name": "theme",
1604
+ "type": "object",
1605
+ "description": "The theme prop specifies a theme to use for determining styles and layout properties for a component. Any styles or\nprops defined in theme may be overwritten by props specified on the component instance.",
1606
+ "defaultValue": "getTheme(themeColor)"
1607
+ },
1608
+ {
1609
+ "name": "themeColor",
1610
+ "type": "string",
1611
+ "description": "Specifies the theme color. Valid values are 'blue', 'green', 'multi', etc.\n\nNote: Not compatible with theme prop\n\n@example themeColor={ChartThemeColor.blue}"
1612
+ },
1613
+ {
1614
+ "name": "width",
1615
+ "type": "number",
1616
+ "description": "The width props specifies the width of the svg viewBox of the chart container\nThis value should be given as a number of pixels"
1617
+ },
1618
+ {
1619
+ "name": "x",
1620
+ "type": "number | string | Function | string[]",
1621
+ "description": "The x prop specifies how to access the X value of each data point.\nIf given as a function, it will be run on each data point, and returned value will be used.\nIf given as an integer, it will be used as an array index for array-type data points.\nIf given as a string, it will be used as a property key for object-type data points.\nIf given as an array of strings, or a string containing dots or brackets,\nit will be used as a nested object property path (for details see Lodash docs for _.get).\nIf `null` or `undefined`, the data value will be used as is (identity function/pass-through).\n\n\n@example 0, 'x', 'x.value.nested.1.thing', 'x[2].also.nested', null, d => Math.sin(d)"
1622
+ },
1623
+ {
1624
+ "name": "y",
1625
+ "type": "number | string | Function | string[]",
1626
+ "description": "The y prop specifies how to access the Y value of each data point.\nIf given as a function, it will be run on each data point, and returned value will be used.\nIf given as an integer, it will be used as an array index for array-type data points.\nIf given as a string, it will be used as a property key for object-type data points.\nIf given as an array of strings, or a string containing dots or brackets,\nit will be used as a nested object property path (for details see Lodash docs for _.get).\nIf `null` or `undefined`, the data value will be used as is (identity function/pass-through).\n\n\n@example 0, 'y', 'y.value.nested.1.thing', 'y[2].also.nested', null, d => Math.sin(d)"
1627
+ },
1628
+ {
1629
+ "name": "y0",
1630
+ "type": "number | string | Function | string[]",
1631
+ "description": "Use y0 data accessor prop to determine how the component defines the baseline y0 data.\nThis prop is useful for defining custom baselines for components like ChartBar or ChartArea.\nThis prop may be given in a variety of formats.\n\n\n@example 'last_quarter_profit', () => 10, 1, 'employees.salary', [\"employees\", \"salary\"]"
1632
+ }
1633
+ ]
1634
+ },
1635
+ {
1636
+ "name": "ChartLabel",
1637
+ "description": "ChartLabel renders the label components that are used across all Victory based components.\n\nSee https://github.com/FormidableLabs/victory/blob/main/packages/victory-core/src/victory-label/victory-label.tsx",
1638
+ "props": [
1639
+ {
1640
+ "name": "active",
1641
+ "type": "boolean",
1642
+ "description": "The active prop specifies whether the label is active or not. The active prop is set by defaultEvents in components\nlike ChartTooltip and VictorySelectionContainer. The active prop is used when evaluating functional styles and\nprops."
1643
+ },
1644
+ {
1645
+ "name": "angle",
1646
+ "type": "string | number",
1647
+ "description": "Specifies the angle to rotate the text by."
1648
+ },
1649
+ {
1650
+ "name": "capHeight",
1651
+ "type": "number | string | Function",
1652
+ "description": "The capHeight prop defines a text metric for the font being used: the expected height of capital letters.\nThis is necessary because of SVG, which (a) positions the *bottom* of the text at `y`, and (b) has no notion of\nline height. The value should ideally use the same units as `lineHeight` and `dy`, preferably ems. If given a\nunitless number, it is assumed to be ems."
1653
+ },
1654
+ {
1655
+ "name": "className",
1656
+ "type": "string",
1657
+ "description": "The className prop specifies a class name that will be applied to the rendered text element."
1658
+ },
1659
+ {
1660
+ "name": "data",
1661
+ "type": "any[]",
1662
+ "description": "Labels that apply to an entire data series will receive the entire series as `data` instead of an individual datum\nprop."
1663
+ },
1664
+ {
1665
+ "name": "datum",
1666
+ "type": "{}",
1667
+ "description": "Victory components can pass a datum prop to their label component. This can be used to calculate functional styles,\nand determine child text"
1668
+ },
1669
+ {
1670
+ "name": "desc",
1671
+ "type": "string",
1672
+ "description": "The desc prop specifies the description of the chart/SVG to assist with accessibility for screen readers. The more\ndescriptive this title is, the more useful it will be for people using screen readers."
1673
+ },
1674
+ {
1675
+ "name": "direction",
1676
+ "type": "'rtl' | 'ltr' | 'inherit'",
1677
+ "description": "The direction prop determines which text direction to apply to the rendered text element"
1678
+ },
1679
+ {
1680
+ "name": "dx",
1681
+ "type": "number | string | Function",
1682
+ "description": "The dx prop defines a horizontal shift from the `x` coordinate."
1683
+ },
1684
+ {
1685
+ "name": "dy",
1686
+ "type": "number | string | Function",
1687
+ "description": "The dy prop defines a vertical shift from the `y` coordinate. Since this component already accounts for\n`capHeight`, `lineHeight`, and `verticalAnchor`, this will usually not be necessary."
1688
+ },
1689
+ {
1690
+ "name": "events",
1691
+ "type": "React.DOMAttributes<any>",
1692
+ "description": "The events prop attaches arbitrary event handlers to the label component.\nEvent handlers are currently only called with their corresponding events."
1693
+ },
1694
+ {
1695
+ "name": "id",
1696
+ "type": "StringOrNumberOrCallback",
1697
+ "description": "The id prop specifies a HTML ID that will be applied to the rendered text element."
1698
+ },
1699
+ {
1700
+ "name": "inline",
1701
+ "type": "boolean",
1702
+ "description": "When the text property contains an array of strings, the inline property lets the <tspan /> elements lay out next\nto each other. If this property is not specified, the <tspan /> elements will stack vertically instead."
1703
+ },
1704
+ {
1705
+ "name": "labelPlacement",
1706
+ "type": "string",
1707
+ "description": "The labelPlacement prop is used to specify the placement of labels relative to the data point they represent.\nThis prop may be given as “vertical”, “parallel” or “perpendicular”. This props is particularly useful in polar\ncharts, where it may be desirable to position a label either parallel or perpendicular to its corresponding angle.\nWhen this prop is not set, perpendicular label placement will be used for polar charts, and vertical label\nplacement will be used for cartesian charts."
1708
+ },
1709
+ {
1710
+ "name": "lineHeight",
1711
+ "type": "number | string | Function",
1712
+ "description": "The lineHeight prop defines how much space a single line of text should take up.\nNote that SVG has no notion of line-height, so the positioning may differ slightly from what you would expect with CSS,\nbut the result is similar: a roughly equal amount of extra space is distributed above and below the line of text.\nThe value should ideally use the same units as `capHeight` and `dy`, preferably ems.\nIf given a unitless number, it is assumed to be ems."
1713
+ },
1714
+ {
1715
+ "name": "origin",
1716
+ "type": "{ x: number, y: number }",
1717
+ "description": "Victory components will pass an origin prop is to define the center point in svg coordinates for polar charts.\n\nNote: It will not typically be necessary to set an origin prop manually"
1718
+ },
1719
+ {
1720
+ "name": "renderInPortal",
1721
+ "type": "boolean",
1722
+ "description": "The renderInPortal prop specifies whether ChartLabel should render text in place or within a VictoryPortal.\nSetting renderInPortal to true is equivalent to wrapping ChartLabel in a VictoryPortal. This prop is false by default."
1723
+ },
1724
+ {
1725
+ "name": "style",
1726
+ "type": "React.CSSProperties | React.CSSProperties[]",
1727
+ "description": "The style prop applies CSS properties to the rendered `<text>` element."
1728
+ },
1729
+ {
1730
+ "name": "text",
1731
+ "type": "number | string | Function | string[]",
1732
+ "description": "The text prop defines the text ChartLabel will render. The text prop may be given as a string, number, a function\nof datum, or an array of any of these. Strings may include newline characters, which ChartLabel will split into\nseparate <tspan/> elements. When text is given as an array, separate <tspan/> elements will be created for each\nelement in the array."
1733
+ },
1734
+ {
1735
+ "name": "textAnchor",
1736
+ "type": "string | Function",
1737
+ "description": "The textAnchor prop defines how the text is horizontally positioned relative to the given `x` and `y` coordinates.\nOptions are \"start\", \"middle\" and \"end\". Note that this overrides the style prop."
1738
+ },
1739
+ {
1740
+ "name": "transform",
1741
+ "type": "string | {} | (() => string | {})",
1742
+ "description": "The transform prop applies a transform to the rendered `<text>` element.\nIn addition to being a string, it can be an object containing transform definitions for easier authoring."
1743
+ },
1744
+ {
1745
+ "name": "verticalAnchor",
1746
+ "type": "string",
1747
+ "description": "The verticalAnchor prop defines how the text is vertically positioned relative to the given `x` and `y`\ncoordinates. Options are \"start\", \"middle\" and \"end\"."
1748
+ },
1749
+ {
1750
+ "name": "x",
1751
+ "type": "number",
1752
+ "description": "The x prop defines the x coordinate to use as a basis for horizontal positioning."
1753
+ },
1754
+ {
1755
+ "name": "y",
1756
+ "type": "number",
1757
+ "description": "The y prop defines the y coordinate to use as a basis for vertical positioning."
1758
+ }
1759
+ ]
1760
+ },
1761
+ {
1762
+ "name": "ChartLegend",
1763
+ "description": "ChartLegend renders a chart legend component.\n\nSee https://github.com/FormidableLabs/victory/blob/main/packages/victory-legend/src/index.d.ts",
1764
+ "props": [
1765
+ {
1766
+ "name": "borderComponent",
1767
+ "type": "React.ReactElement<any>",
1768
+ "description": "The borderComponent prop takes a component instance which will be responsible\nfor rendering a border around the legend. The new element created from the passed\nborderComponent will be provided with the following properties calculated by\nChartLegend: x, y, width, height, and style. Any of these props may be\noverridden by passing in props to the supplied component, or modified or ignored\nwithin the custom component itself. If a borderComponent\nis not provided, ChartLegend will use its default Border component.\nPlease note that the default width and height calculated\nfor the border component is based on approximated\ntext measurements, and may need to be adjusted."
1769
+ },
1770
+ {
1771
+ "name": "borderPadding",
1772
+ "type": "number | { top: number, bottom: number, left: number, right: number }",
1773
+ "description": "The borderPadding specifies the amount of padding that should\nbe added between the legend items and the border. This prop may be given as\na number, or as an object with values specified for top, bottom, left, and right.\nPlease note that the default width and height calculated for the border\ncomponent is based on approximated text measurements, so padding may need to be adjusted."
1774
+ },
1775
+ {
1776
+ "name": "centerTitle",
1777
+ "type": "boolean",
1778
+ "description": "The centerTitle boolean prop specifies whether a legend title should be centered."
1779
+ },
1780
+ {
1781
+ "name": "colorScale",
1782
+ "type": "string[]",
1783
+ "description": "The colorScale prop defines a color scale to be applied to each data\nsymbol in ChartLegend. This prop should be given as an array of CSS\ncolors, or as a string corresponding to one of the built in color\nscales. Colors will repeat when there are more symbols than colors in the\nprovided colorScale."
1784
+ },
1785
+ {
1786
+ "name": "containerComponent",
1787
+ "type": "React.ReactElement<any>",
1788
+ "description": "The containerComponent prop takes an entire component which will be used to\ncreate a container element for standalone charts.\nThe new element created from the passed containerComponent wil be provided with\nthese props from ChartLegend: height, width, children\n(the chart itself) and style. Props that are not provided by the\nchild chart component include title and desc, both of which\nare intended to add accessibility to Victory components. The more descriptive these props\nare, the more accessible your data will be for people using screen readers.\nAny of these props may be overridden by passing in props to the supplied component,\nor modified or ignored within the custom component itself. If a dataComponent is\nnot provided, ChartLegend will use the default ChartContainer component.\n\n@example <ChartContainer title=\"Chart of Dog Breeds\" desc=\"This chart shows ...\" />",
1789
+ "defaultValue": "<ChartContainer />"
1790
+ },
1791
+ {
1792
+ "name": "data",
1793
+ "type": "{\n name?: string;\n labels?: {\n fill?: string;\n };\n symbol?: {\n fill?: string;\n type?: string;\n };\n}[]",
1794
+ "description": "Specify data via the data prop. ChartLegend expects data as an\narray of objects with name (required), symbol, and labels properties.\nThe data prop must be given as an array."
1795
+ },
1796
+ {
1797
+ "name": "dataComponent",
1798
+ "type": "React.ReactElement<any>",
1799
+ "description": "The dataComponent prop takes a component instance which will be\nresponsible for rendering a data element used to associate a symbol\nor color with each data series. The new element created from the\npassed dataComponent will be provided with the following properties\ncalculated by ChartLegend: x, y, size, style, and symbol. Any of\nthese props may be overridden by passing in props to the supplied\ncomponent, or modified or ignored within the custom component itself.\nIf a dataComponent is not provided, ChartLegend will use its\ndefault Point component.",
1800
+ "defaultValue": "<ChartPoint />"
1801
+ },
1802
+ {
1803
+ "name": "eventKey",
1804
+ "type": "number | string | Function | string[]",
1805
+ "description": "ChartLegend uses the standard eventKey prop to specify how event targets\nare addressed. This prop is not commonly used."
1806
+ },
1807
+ {
1808
+ "name": "events",
1809
+ "type": "object[]",
1810
+ "description": "ChartLegend uses the standard events prop."
1811
+ },
1812
+ {
1813
+ "name": "externalEventMutations",
1814
+ "type": "object[]",
1815
+ "description": "ChartLegend uses the standard externalEventMutations prop."
1816
+ },
1817
+ {
1818
+ "name": "groupComponent",
1819
+ "type": "React.ReactElement<any>",
1820
+ "description": "The groupComponent prop takes an entire component which will be used to\ncreate group elements for use within container elements. This prop defaults\nto a <g> tag on web, and a react-native-svg <G> tag on mobile"
1821
+ },
1822
+ {
1823
+ "name": "gutter",
1824
+ "type": "number | { left: number; right: number }",
1825
+ "description": "The gutter prop defines the number of pixels between legend rows or\ncolumns, depending on orientation. When orientation is horizontal,\ngutters are between columns. When orientation is vertical, gutters\nare the space between rows."
1826
+ },
1827
+ {
1828
+ "name": "itemsPerRow",
1829
+ "type": "number",
1830
+ "description": "The itemsPerRow prop determines how many items to render in each row\nof a horizontal legend, or in each column of a vertical legend. This\nprop should be given as an integer. When this prop is not given,\nlegend items will be rendered in a single row or column."
1831
+ },
1832
+ {
1833
+ "name": "labelComponent",
1834
+ "type": "React.ReactElement<any>",
1835
+ "description": "The labelComponent prop takes a component instance which will be used\nto render each legend label. The new element created from the passed\nlabelComponent will be supplied with the following properties: x, y,\nstyle, and text. Any of these props may be overridden by passing in\nprops to the supplied component, or modified or ignored within the\ncustom component itself. If labelComponent is omitted, a new\nChartLabel will be created with the props described above.",
1836
+ "defaultValue": "<ChartLabel />"
1837
+ },
1838
+ {
1839
+ "name": "name",
1840
+ "type": "string",
1841
+ "description": "The name prop is typically used to reference a component instance when defining shared events. However, this\noptional prop may also be applied to child elements as an ID prefix. This is a workaround to ensure Victory\nbased components output unique IDs when multiple charts appear in a page."
1842
+ },
1843
+ {
1844
+ "name": "orientation",
1845
+ "type": "string",
1846
+ "description": "The orientation prop takes a string that defines whether legend data\nare displayed in a row or column. When orientation is \"horizontal\",\nlegend items will be displayed in a single row. When orientation is\n\"vertical\", legend items will be displayed in a single column. Line\nand text-wrapping is not currently supported, so \"vertical\"\norientation is both the default setting and recommended for\ndisplaying many series of data."
1847
+ },
1848
+ {
1849
+ "name": "padding",
1850
+ "type": "number | { top: number, bottom: number, left: number, right: number }",
1851
+ "description": "The padding props specifies the amount of padding in number of pixels between\nthe edge of the chart and any rendered child components. This prop can be given\nas a number or as an object with padding specified for top, bottom, left\nand right."
1852
+ },
1853
+ {
1854
+ "name": "patternScale",
1855
+ "type": "string[]",
1856
+ "description": "The patternScale prop is an optional prop that defines patterns to apply, where applicable. This prop should be\ngiven as a string array of pattern URLs. Patterns will be assigned to children by index and will repeat when there\nare more children than patterns in the provided patternScale. Use null to omit the pattern for a given index.\n\nNote: Not all components are supported; for example, ChartLine, ChartBullet, ChartThreshold, etc.\n\n@example patternScale={[ 'url(\"#pattern1\")', 'url(\"#pattern2\")', null ]}"
1857
+ },
1858
+ {
1859
+ "name": "responsive",
1860
+ "type": "boolean",
1861
+ "description": "The responsive prop specifies whether the rendered container should be a responsive container with a viewBox\nattribute, or a static container with absolute width and height.\n\nUseful when legend is located inside a chart -- default is false.\n\nNote: Not compatible with containerComponent prop",
1862
+ "defaultValue": "true"
1863
+ },
1864
+ {
1865
+ "name": "rowGutter",
1866
+ "type": "number | { top: number, bottom: number }",
1867
+ "description": "The rowGutter prop defines the number of pixels between legend rows.\nThis prop may be given as a number, or as an object with values\nspecified for “top” and “bottom” gutters. To set spacing between columns,\nuse the gutter prop.\n\n\n@example { top: 0, bottom: 10 }"
1868
+ },
1869
+ {
1870
+ "name": "standalone",
1871
+ "type": "boolean",
1872
+ "description": "The standalone prop determines whether the component will render a standalone svg\nor a <g> tag that will be included in an external svg. Set standalone to false to\ncompose ChartLegend with other components within an enclosing <svg> tag."
1873
+ },
1874
+ {
1875
+ "name": "style",
1876
+ "type": "{ border: object, data: object, labels: object, parent: object, title: object }",
1877
+ "description": "The style prop specifies styles for your pie. ChartLegend relies on Radium,\nso valid Radium style objects should work for this prop. Height, width, and\npadding should be specified via the height, width, and padding props.\n\n\n@example {data: {stroke: \"black\"}, label: {fontSize: 10}}"
1878
+ },
1879
+ {
1880
+ "name": "symbolSpacer",
1881
+ "type": "number",
1882
+ "description": "The symbolSpacer prop defines the number of pixels between data\ncomponents and label components."
1883
+ },
1884
+ {
1885
+ "name": "theme",
1886
+ "type": "object",
1887
+ "description": "The theme prop takes a style object with nested data, labels, and parent objects.\nYou can create this object yourself, or you can use a theme provided by\nWhen using ChartLegend as a solo component, implement the theme directly on\nChartLegend. If you are wrapping ChartLegend in ChartChart or\nChartGroup, please call the theme on the outermost wrapper component instead.",
1888
+ "defaultValue": "getTheme(themeColor)"
1889
+ },
1890
+ {
1891
+ "name": "themeColor",
1892
+ "type": "string",
1893
+ "description": "Specifies the theme color. Valid values are 'blue', 'green', 'multi', etc.\n\nNote: Not compatible with theme prop\n\n@example themeColor={ChartThemeColor.blue}"
1894
+ },
1895
+ {
1896
+ "name": "title",
1897
+ "type": "string | string[]",
1898
+ "description": "The title prop specifies a title to render with the legend.\nThis prop should be given as a string, or an array of strings for multi-line titles."
1899
+ },
1900
+ {
1901
+ "name": "titleComponent",
1902
+ "type": "React.ReactElement<any>",
1903
+ "description": "The titleComponent prop takes a component instance which will be used to render\na title for the component. The new element created from the passed label\ncomponent will be supplied with the following properties: x, y, index, data,\ndatum, verticalAnchor, textAnchor, style, text, and events. Any of these props\nmay be overridden by passing in props to the supplied component, or modified\nor ignored within the custom component itself. If labelComponent is omitted,\na new ChartLabel will be created with the props described above.",
1904
+ "defaultValue": "<ChartLabel />"
1905
+ },
1906
+ {
1907
+ "name": "titleOrientation",
1908
+ "type": "string",
1909
+ "description": "The titleOrientation prop specifies where the title should be rendered\nin relation to the rest of the legend. Possible values\nfor this prop are “top”, “bottom”, “left”, and “right”."
1910
+ },
1911
+ {
1912
+ "name": "width",
1913
+ "type": "number",
1914
+ "description": "Specifies the width of the svg viewBox of the chart container. This value should be given as a\nnumber of pixels.\n\nBecause Victory renders responsive containers, the width and height props do not determine the width and\nheight of the chart in number of pixels, but instead define an aspect ratio for the chart. The exact number of\npixels will depend on the size of the container the chart is rendered into."
1915
+ },
1916
+ {
1917
+ "name": "x",
1918
+ "type": "number",
1919
+ "description": "The x and y props define the base position of the legend element."
1920
+ },
1921
+ {
1922
+ "name": "y",
1923
+ "type": "number",
1924
+ "description": "The x and y props define the base position of the legend element."
1925
+ }
1926
+ ]
1927
+ },
1928
+ {
1929
+ "name": "ChartLegendTooltip",
1930
+ "description": "The ChartLegendTooltip is based on ChartCursorTooltip, which is intended to be used with a voronoi cursor\ncontainer. This works best with charts such as area and line, for example.\n\nSee https://github.com/FormidableLabs/victory/blob/main/packages/victory-tooltip/src/index.d.ts",
1931
+ "props": [
1932
+ {
1933
+ "name": "activateData",
1934
+ "type": "boolean",
1935
+ "description": "When true, tooltip events will set the active prop on both data and label elements."
1936
+ },
1937
+ {
1938
+ "name": "active",
1939
+ "type": "boolean",
1940
+ "description": "The active prop specifies whether the tooltip component should be displayed."
1941
+ },
1942
+ {
1943
+ "name": "angle",
1944
+ "type": "number",
1945
+ "description": "The angle prop specifies the angle to rotate the tooltip around its origin point."
1946
+ },
1947
+ {
1948
+ "name": "center",
1949
+ "type": "{ x: number; y: number }",
1950
+ "description": "The center prop determines the position of the center of the tooltip flyout. This prop should be given as an object\nthat describes the desired x and y svg coordinates of the center of the tooltip. This prop is useful for\npositioning the flyout of a tooltip independent from the pointer. When ChartTooltip is used with\nChartVoronoiContainer, the center prop is what enables the mouseFollowTooltips option. When this prop is set,\nnon-zero pointerLength values will no longer be respected.",
1951
+ "defaultValue": "{ x: 0, y: 0 }"
1952
+ },
1953
+ {
1954
+ "name": "centerOffset",
1955
+ "type": "{ x: number | Function, y: number | Function }",
1956
+ "description": "The centerOffset prop determines the position of the center of the tooltip flyout in relation to the flyout\npointer. This prop should be given as an object of x and y, where each is either a numeric offset value or a\nfunction that returns a numeric value. When this prop is set, non-zero pointerLength values will no longer be\nrespected."
1957
+ },
1958
+ {
1959
+ "name": "constrainToVisibleArea",
1960
+ "type": "boolean",
1961
+ "description": "The constrainToVisibleArea prop determines whether to coerce tooltips so that they fit within the visible area of\nthe chart. When this prop is set to true, tooltip pointers will still point to the correct data point, but the\ncenter of the tooltip will be shifted to fit within the overall width and height of the svg Victory renders."
1962
+ },
1963
+ {
1964
+ "name": "cornerRadius",
1965
+ "type": "number | Function",
1966
+ "description": "The cornerRadius prop determines corner radius of the flyout container. This prop may be given as a positive number\nor a function of datum."
1967
+ },
1968
+ {
1969
+ "name": "data",
1970
+ "type": "any[]",
1971
+ "description": "Victory components can pass a data prop to their label component. This can be useful in custom components that need\nto make use of the entire dataset."
1972
+ },
1973
+ {
1974
+ "name": "datum",
1975
+ "type": "{}",
1976
+ "description": "Victory components can pass a datum prop to their label component. This can be used to calculate functional styles,\nand determine text."
1977
+ },
1978
+ {
1979
+ "name": "dx",
1980
+ "type": "number | Function",
1981
+ "description": "The dx prop defines a horizontal shift from the x coordinate."
1982
+ },
1983
+ {
1984
+ "name": "dy",
1985
+ "type": "number | Function",
1986
+ "description": "The dy prop defines a vertical shift from the y coordinate."
1987
+ },
1988
+ {
1989
+ "name": "events",
1990
+ "type": "object",
1991
+ "description": "The events prop attaches arbitrary event handlers to the label component. This prop should be given as an object of\nevent names and corresponding event handlers. When events are provided via Victory’s event system, event handlers\nwill be called with the event, the props of the component is attached to, and an eventKey.\n\n\n@example events={{onClick: (evt) => alert(\"x: \" + evt.clientX)}}"
1992
+ },
1993
+ {
1994
+ "name": "flyoutComponent",
1995
+ "type": "React.ReactElement<any>",
1996
+ "description": "The flyoutComponent prop takes a component instance which will be used to create the flyout path for each tooltip.\nThe new element created from the passed flyoutComponent will be supplied with the following properties: x, y, dx, dy,\nindex, datum, cornerRadius, pointerLength, pointerWidth, width, height, orientation, style, and events.\nAny of these props may be overridden by passing in props to the supplied component, or modified or ignored within\nthe custom component itself. If flyoutComponent is omitted, a default Flyout component will be created with props\ndescribed above.\n\n@example flyoutComponent={<Flyout x={50} y={50}/>}, flyoutComponent={<MyCustomFlyout/>}"
1997
+ },
1998
+ {
1999
+ "name": "flyoutHeight",
2000
+ "type": "number | Function",
2001
+ "description": "The flyoutHeight prop defines the height of the tooltip flyout. This prop may be given as a positive number or a function\nof datum. If this prop is not set, height will be determined based on an approximate text size calculated from the\ntext and style props provided to ChartTooltip."
2002
+ },
2003
+ {
2004
+ "name": "flyoutStyle",
2005
+ "type": "number | Function",
2006
+ "description": "The style prop applies SVG style properties to the rendered flyout container. These props will be passed to the\nflyoutComponent."
2007
+ },
2008
+ {
2009
+ "name": "flyoutWidth",
2010
+ "type": "number | Function",
2011
+ "description": "The flyoutWidth prop defines the width of the tooltip flyout. This prop may be given as a positive number or a\nfunction of datum. If this prop is not set, flyoutWidth will be determined based on an approximate text size\ncalculated from the text and style props provided to VictoryTooltip."
2012
+ },
2013
+ {
2014
+ "name": "groupComponent",
2015
+ "type": "React.ReactElement<any>",
2016
+ "description": "The groupComponent prop takes a component instance which will be used to create group elements for use within\ncontainer elements. This prop defaults to a <g> tag.}"
2017
+ },
2018
+ {
2019
+ "name": "horizontal",
2020
+ "type": "boolean",
2021
+ "description": "The horizontal prop determines whether to plot the flyouts to the left / right of the (x, y) coordinate rather than top / bottom.\nThis is useful when an orientation prop is not provided, and data will determine the default orientation. i.e.\nnegative values result in a left orientation and positive values will result in a right orientation by default."
2022
+ },
2023
+ {
2024
+ "name": "index",
2025
+ "type": "number | string",
2026
+ "description": "The index prop represents the index of the datum in the data array."
2027
+ },
2028
+ {
2029
+ "name": "isCursorTooltip",
2030
+ "type": "boolean",
2031
+ "description": "The ChartLegendTooltip is based on ChartCursorTooltip, which is intended to be used with a voronoi cursor\ncontainer. When isCursorTooltip is true (default), ChartCursorTooltip is used. If false, ChartTooltip is used.",
2032
+ "defaultValue": "true"
2033
+ },
2034
+ {
2035
+ "name": "labelComponent",
2036
+ "type": "React.ReactElement<any>",
2037
+ "description": "The labelComponent prop takes a component instance which will be used to render each tooltip label. The new element\ncreated from the passed labelComponent will be supplied with the following properties: x, y, index, datum,\nverticalAnchor, textAnchor, style, text, and events. Any of these props may be overridden by passing in props to\nthe supplied component, or modified or ignored within the custom component itself. If labelComponent is omitted, a\nnew ChartLabel will be created with the props described above.\n\n@example labelComponent={<ChartLabel dy={20}/>}, labelComponent={<MyCustomLabel/>}",
2038
+ "defaultValue": "<ChartLegendTooltipContent />"
2039
+ },
2040
+ {
2041
+ "name": "labelTextAnchor",
2042
+ "type": "string | Function",
2043
+ "description": "Defines how the labelComponent text is horizontally positioned relative to its `x` and `y` coordinates. Valid\nvalues are 'start', 'middle', 'end', and 'inherit'."
2044
+ },
2045
+ {
2046
+ "name": "legendData",
2047
+ "type": "{\n childName?: string;\n name?: string;\n labels?: {\n fill?: string;\n };\n symbol?: {\n fill?: string;\n type?: string;\n };\n}[]",
2048
+ "description": "Specify data via the data prop. ChartLegend expects data as an array of objects with name (required), symbol, and\nlabels properties. The childName is used to sync the data series associated with the given chart child name.\n\nThe data prop must be given as an array.\n\n@example\n\nlegendData={[{ name: `GBps capacity - 45%` }, { name: 'Unused' }]}\nlegendData={[{ childName: `cats`, name: `Total cats` }, { childName: `dogs`, name: 'Total dogs' }]}"
2049
+ },
2050
+ {
2051
+ "name": "orientation",
2052
+ "type": "string | Function",
2053
+ "description": "The orientation prop determines which side of the (x, y) coordinate the tooltip should be rendered on.\nThis prop can be given as “top”, “bottom”, “left”, “right”, or as a function of datum that returns one of these\nvalues. If this prop is not provided it will be determined from the sign of the datum, and the value of the\nhorizontal prop."
2054
+ },
2055
+ {
2056
+ "name": "patternScale",
2057
+ "type": "string[]",
2058
+ "description": "The patternScale prop is an optional prop that defines patterns to apply, where applicable. This prop should be\ngiven as a string array of pattern URLs. Patterns will be assigned to children by index and will repeat when there\nare more children than patterns in the provided patternScale. Use null to omit the pattern for a given index.\n\nNote: Not all components are supported; for example, ChartLine, ChartBullet, ChartThreshold, etc.\n\n@example patternScale={[ 'url(\"#pattern1\")', 'url(\"#pattern2\")', null ]}"
2059
+ },
2060
+ {
2061
+ "name": "pointerLength",
2062
+ "type": "number | Function",
2063
+ "description": "The pointerLength prop determines the length of the triangular pointer extending from the flyout. This prop may be\ngiven as a positive number or a function of datum."
2064
+ },
2065
+ {
2066
+ "name": "pointerOrientation",
2067
+ "type": "string | Function",
2068
+ "description": "This prop determines which side of the tooltip flyout the pointer should originate on. When this prop is not set,\nit will be determined based on the overall orientation of the flyout in relation to its data point, and any center\nor centerOffset values. Valid values are 'top', 'bottom', 'left' and 'right."
2069
+ },
2070
+ {
2071
+ "name": "pointerWidth",
2072
+ "type": "number | Function",
2073
+ "description": "The pointerWidth prop determines the width of the base of the triangular pointer extending from\nthe flyout. This prop may be given as a positive number or a function of datum."
2074
+ },
2075
+ {
2076
+ "name": "renderInPortal",
2077
+ "type": "boolean",
2078
+ "description": "When renderInPortal is true, rendered tooltips will be wrapped in VictoryPortal and rendered within the Portal element\nwithin ChartContainer. Note: This prop should not be set to true when using a custom container element."
2079
+ },
2080
+ {
2081
+ "name": "style",
2082
+ "type": "React.CSSProperties | React.CSSProperties[]",
2083
+ "description": "The style prop applies CSS properties to the rendered `<text>` element."
2084
+ },
2085
+ {
2086
+ "name": "text",
2087
+ "type": "number | string | Function | string[] | number[]",
2088
+ "description": "The text prop defines the text ChartTooltip will render. The text prop may be given as a string, number, or\nfunction of datum. When ChartLabel is used as the labelComponent, strings may include newline characters, which\nChartLabel will split in to separate <tspan/> elements."
2089
+ },
2090
+ {
2091
+ "name": "theme",
2092
+ "type": "object",
2093
+ "description": "The theme prop specifies a theme to use for determining styles and layout properties for a component. Any styles or\nprops defined in theme may be overwritten by props specified on the component instance.\n\nNote: Theme may be overridden when flyout is rendered",
2094
+ "defaultValue": "getTheme(themeColor)"
2095
+ },
2096
+ {
2097
+ "name": "themeColor",
2098
+ "type": "string",
2099
+ "description": "Specifies the theme color. Valid values are 'blue', 'green', 'multi', etc.\n\nNote: Not compatible with theme prop\n\n@example themeColor={ChartThemeColor.blue}"
2100
+ },
2101
+ {
2102
+ "name": "title",
2103
+ "type": "number | string | Function | string[]",
2104
+ "description": "The title prop specifies a title to render with the legend.\n\n\n@example title={(datum) => datum.x}"
2105
+ },
2106
+ {
2107
+ "name": "x",
2108
+ "type": "number",
2109
+ "description": "The x prop defines the x coordinate to use as a basis for horizontal positioning."
2110
+ },
2111
+ {
2112
+ "name": "y",
2113
+ "type": "number",
2114
+ "description": "The y prop defines the y coordinate to use as a basis for vertical positioning."
2115
+ }
2116
+ ]
2117
+ },
2118
+ {
2119
+ "name": "ChartLine",
2120
+ "description": "ChartLine renders a dataset as a single line path. Since ChartLine renders only a single element to represent a\ndataset rather than individual elements for each data point, some of its behavior is different from other Victory\nbased components. Pay special attention to style and events props, and take advantage of ChartVoronoiContainer to\nenable tooltips. ChartLine can be composed with Chart to create line charts.\n\nSee https://github.com/FormidableLabs/victory/blob/main/packages/victory-line/src/victory-line.tsx",
2121
+ "props": [
2122
+ {
2123
+ "name": "animate",
2124
+ "type": "boolean | object",
2125
+ "description": "The animate prop specifies props for VictoryAnimation to use.\nThe animate prop should also be used to specify enter and exit\ntransition configurations with the `onExit` and `onEnter` namespaces respectively.\n\n\n@example\n{duration: 500, onExit: () => {}, onEnter: {duration: 500, before: () => ({y: 0})})}"
2126
+ },
2127
+ {
2128
+ "name": "categories",
2129
+ "type": "string[] | { x: string[], y: string[] }",
2130
+ "description": "The categories prop specifies how categorical data for a chart should be ordered.\nThis prop should be given as an array of string values, or an object with\nthese arrays of values specified for x and y. If this prop is not set,\ncategorical data will be plotted in the order it was given in the data array\n\n\n@example [\"dogs\", \"cats\", \"mice\"]"
2131
+ },
2132
+ {
2133
+ "name": "containerComponent",
2134
+ "type": "React.ReactElement<any>",
2135
+ "description": "The containerComponent prop takes an entire component which will be used to\ncreate a container element for standalone charts.\nThe new element created from the passed containerComponent wil be provided with\nthese props from ChartLine: height, width, children\n(the chart itself) and style. Props that are not provided by the\nchild chart component include title and desc, both of which\nare intended to add accessibility to Victory components. The more descriptive these props\nare, the more accessible your data will be for people using screen readers.\nAny of these props may be overridden by passing in props to the supplied component,\nor modified or ignored within the custom component itself. If a dataComponent is\nnot provided, ChartLine will use the default ChartContainer component.\n\n@example <ChartContainer title=\"Chart of Dog Breeds\" desc=\"This chart shows...\" />",
2136
+ "defaultValue": "<ChartContainer />"
2137
+ },
2138
+ {
2139
+ "name": "data",
2140
+ "type": "any[]",
2141
+ "description": "The data prop specifies the data to be plotted. Data should be in the form of an array\nof data points, or an array of arrays of data points for multiple datasets.\nEach data point may be any format you wish (depending on the `x` and `y` accessor props),\nbut by default, an object with x and y properties is expected.\n\n@example [{x: 1, y: 2}, {x: 2, y: 3}], [[1, 2], [2, 3]],\n[[{x: \"a\", y: 1}, {x: \"b\", y: 2}], [{x: \"a\", y: 2}, {x: \"b\", y: 3}]]"
2142
+ },
2143
+ {
2144
+ "name": "dataComponent",
2145
+ "type": "React.ReactElement<any>",
2146
+ "description": "The dataComponent prop takes an entire component which will be used to create an area.\nThe new element created from the passed dataComponent will be provided with the\nfollowing properties calculated by ChartLine: a scale, style, events, interpolation,\nand an array of modified data objects (including x, y, and calculated y0 and y1).\nAny of these props may be overridden by passing in props to the supplied component,\nor modified or ignored within the custom component itself. If a dataComponent is\nnot provided, ChartLine will use its default Line component."
2147
+ },
2148
+ {
2149
+ "name": "domain",
2150
+ "type": "number[] | { x: number[], y: number[] }",
2151
+ "description": "The domain prop describes the range of values your chart will cover. This prop can be\ngiven as a array of the minimum and maximum expected values for your bar chart,\nor as an object that specifies separate arrays for x and y.\nIf this prop is not provided, a domain will be calculated from data, or other\navailable information.\n\n\n@example [low, high], { x: [low, high], y: [low, high] }\n\n[-1, 1], {x: [0, 100], y: [0, 1]}"
2152
+ },
2153
+ {
2154
+ "name": "domainPadding",
2155
+ "type": "number | number[] | { x: number[], y: number[] }",
2156
+ "description": "The domainPadding prop specifies a number of pixels of padding to add to the\nbeginning and end of a domain. This prop is useful for explicitly spacing ticks farther\nfrom the origin to prevent crowding. This prop should be given as an object with\nnumbers specified for x and y.\n\n\n@example [left, right], { x: [left, right], y: [bottom, top] }\n\n{x: [10, -10], y: 5}"
2157
+ },
2158
+ {
2159
+ "name": "eventKey",
2160
+ "type": "number | string | Function",
2161
+ "description": "Similar to data accessor props `x` and `y`, this prop may be used to functionally\nassign eventKeys to data"
2162
+ },
2163
+ {
2164
+ "name": "events",
2165
+ "type": "object[]",
2166
+ "description": "The event prop take an array of event objects. Event objects are composed of\na target, an eventKey, and eventHandlers. Targets may be any valid style namespace\nfor a given component, so \"data\" and \"labels\" are all valid targets for ChartLine events.\nSince ChartLine only renders a single element, the eventKey property is not used.\nThe eventHandlers object should be given as an object whose keys are standard\nevent names (i.e. onClick) and whose values are event callbacks. The return value\nof an event handler is used to modify elements. The return value should be given\nas an object or an array of objects with optional target and eventKey keys,\nand a mutation key whose value is a function. The target and eventKey keys\nwill default to those corresponding to the element the event handler was attached to.\nThe mutation function will be called with the calculated props for the individual selected\nelement (i.e. a line), and the object returned from the mutation function\nwill override the props of the selected element via object assignment.\n\n\n@example\nevents={[\n {\n target: \"data\",\n eventHandlers: {\n onClick: () => {\n return [\n {\n mutation: (props) => {\n return {style: merge({}, props.style, {stroke: \"orange\"})};\n }\n }, {\n target: \"labels\",\n mutation: () => {\n return {text: \"hey\"};\n }\n }\n ];\n }\n }\n }\n]}"
2167
+ },
2168
+ {
2169
+ "name": "externalEventMutations",
2170
+ "type": "object[]",
2171
+ "description": "ChartLine uses the standard externalEventMutations prop."
2172
+ },
2173
+ {
2174
+ "name": "groupComponent",
2175
+ "type": "React.ReactElement<any>",
2176
+ "description": "The groupComponent prop takes an entire component which will be used to\ncreate group elements for use within container elements. This prop defaults\nto a <g> tag on web, and a react-native-svg <G> tag on mobile"
2177
+ },
2178
+ {
2179
+ "name": "height",
2180
+ "type": "number",
2181
+ "description": "The height props specifies the height the svg viewBox of the chart container.\nThis value should be given as a number of pixels"
2182
+ },
2183
+ {
2184
+ "name": "horizontal",
2185
+ "type": "boolean",
2186
+ "description": "The horizontal prop determines whether data will be plotted horizontally.\nWhen this prop is set to true, the independent variable will be plotted on the y axis\nand the dependent variable will be plotted on the x axis."
2187
+ },
2188
+ {
2189
+ "name": "interpolation",
2190
+ "type": "string | Function",
2191
+ "description": "The interpolation prop determines how data points should be connected when plotting a line.\nPolar area charts may use the following interpolation options: \"basis\", \"cardinal\", \"catmullRom\", \"linear\".\nCartesian area charts may use the following interpolation options: \"basis\", \"cardinal\", \"catmullRom\", \"linear\",\n\"monotoneX\", \"monotoneY\", \"natural\", \"step\", \"stepAfter\", \"stepBefore\"."
2192
+ },
2193
+ {
2194
+ "name": "labelComponent",
2195
+ "type": "React.ReactElement<any>",
2196
+ "description": "The labelComponent prop takes in an entire label component which will be used\nto create a label for the area. The new element created from the passed labelComponent\nwill be supplied with the following properties: x, y, index, data, verticalAnchor,\ntextAnchor, angle, style, text, and events. any of these props may be overridden\nby passing in props to the supplied component, or modified or ignored within\nthe custom component itself. If labelComponent is omitted, a new ChartLabel\nwill be created with props described above. This labelComponent prop should be used to\nprovide a series label for ChartLine. If individual labels are required for each\ndata point, they should be created by composing ChartLine with VictoryScatter"
2197
+ },
2198
+ {
2199
+ "name": "labels",
2200
+ "type": "string[] | number[] | ((data: any) => string | number | null)",
2201
+ "description": "The labels prop defines labels that will appear above each bar in your chart.\nThis prop should be given as an array of values or as a function of data.\nIf given as an array, the number of elements in the array should be equal to\nthe length of the data array. Labels may also be added directly to the data object\nlike data={[{x: 1, y: 1, label: \"first\"}]}.\n\n@example [\"spring\", \"summer\", \"fall\", \"winter\"], (datum) => datum.title"
2202
+ },
2203
+ {
2204
+ "name": "maxDomain",
2205
+ "type": "number | { x?: number; y?: number }",
2206
+ "description": "The maxDomain prop defines a maximum domain value for a chart. This prop is useful in situations where the maximum\ndomain of a chart is static, while the minimum value depends on data or other variable information. If the domain\nprop is set in addition to maximumDomain, domain will be used.\n\nNote: The x value supplied to the maxDomain prop refers to the independent variable, and the y value refers to the\ndependent variable. This may cause confusion in horizontal charts, as the independent variable will corresponds to\nthe y axis.\n\n@example\n\nmaxDomain={0}\nmaxDomain={{ y: 0 }}"
2207
+ },
2208
+ {
2209
+ "name": "minDomain",
2210
+ "type": "number | { x?: number; y?: number }",
2211
+ "description": "The minDomain prop defines a minimum domain value for a chart. This prop is useful in situations where the minimum\ndomain of a chart is static, while the maximum value depends on data or other variable information. If the domain\nprop is set in addition to minimumDomain, domain will be used.\n\nNote: The x value supplied to the minDomain prop refers to the independent variable, and the y value refers to the\ndependent variable. This may cause confusion in horizontal charts, as the independent variable will corresponds to\nthe y axis.\n\n@example\n\nminDomain={0}\nminDomain={{ y: 0 }}"
2212
+ },
2213
+ {
2214
+ "name": "name",
2215
+ "type": "string",
2216
+ "description": "The name prop is used to reference a component instance when defining shared events."
2217
+ },
2218
+ {
2219
+ "name": "origin",
2220
+ "type": "{ x: number, y: number }",
2221
+ "description": "Victory components will pass an origin prop is to define the center point in svg coordinates for polar charts.\n\nNote: It will not typically be necessary to set an origin prop manually"
2222
+ },
2223
+ {
2224
+ "name": "padding",
2225
+ "type": "number | { top: number, bottom: number, left: number, right: number }",
2226
+ "description": "The padding props specifies the amount of padding in number of pixels between\nthe edge of the chart and any rendered child components. This prop can be given\nas a number or as an object with padding specified for top, bottom, left\nand right."
2227
+ },
2228
+ {
2229
+ "name": "range",
2230
+ "type": "number[] | { x: number[], y: number[] }",
2231
+ "description": "The range prop describes the dimensions over which data may be plotted. For cartesian coordinate systems, this\ncorresponds to minimum and maximum svg coordinates in the x and y dimension. In polar coordinate systems this\ncorresponds to a range of angles and radii. When this value is not given it will be calculated from the width,\nheight, and padding, or from the startAngle and endAngle in the case of polar charts. All components in a given\nchart must share the same range, so setting this prop on children nested within Chart or\nChartGroup will have no effect. This prop is usually not set manually.\n\n\n@example [low, high] | { x: [low, high], y: [low, high] }\n\nCartesian: range={{ x: [50, 250], y: [50, 250] }}\nPolar: range={{ x: [0, 360], y: [0, 250] }}"
2232
+ },
2233
+ {
2234
+ "name": "samples",
2235
+ "type": "number",
2236
+ "description": "The samples prop specifies how many individual points to plot when plotting\ny as a function of x. Samples is ignored if x props are provided instead."
2237
+ },
2238
+ {
2239
+ "name": "scale",
2240
+ "type": "string | { x: string, y: string }",
2241
+ "description": "The scale prop determines which scales your chart should use. This prop can be\ngiven as a string specifying a supported scale (\"linear\", \"time\", \"log\", \"sqrt\"),\nas a d3 scale function, or as an object with scales specified for x and y\n\n\n@example d3Scale.time(), {x: \"linear\", y: \"log\"}"
2242
+ },
2243
+ {
2244
+ "name": "singleQuadrantDomainPadding",
2245
+ "type": "boolean | { x?: boolean; y?: boolean }",
2246
+ "description": "By default domainPadding is coerced to existing quadrants. This means that if a given domain only includes positive\nvalues, no amount of padding applied by domainPadding will result in a domain with negative values. This is the\ndesired behavior in most cases. For users that need to apply padding without regard to quadrant, the\nsingleQuadrantDomainPadding prop may be used. This prop may be given as a boolean or an object with boolean values\nspecified for \"x\" and/or \"y\". When this prop is false (or false for a given dimension), padding will be applied\nwithout regard to quadrant. If this prop is not specified, domainPadding will be coerced to existing quadrants.\n\nNote: The x value supplied to the singleQuadrantDomainPadding prop refers to the independent variable, and the y\nvalue refers to the dependent variable. This may cause confusion in horizontal charts, as the independent variable\nwill corresponds to the y axis.\n\n@example\n\nsingleQuadrantDomainPadding={false}\nsingleQuadrantDomainPadding={{ x: false }}"
2247
+ },
2248
+ {
2249
+ "name": "sortKey",
2250
+ "type": "DataGetterPropType",
2251
+ "description": "Use the sortKey prop to indicate how data should be sorted. This prop\nis given directly to the lodash sortBy function to be executed on the\nfinal dataset."
2252
+ },
2253
+ {
2254
+ "name": "sortOrder",
2255
+ "type": "string",
2256
+ "description": "The sortOrder prop specifies whether sorted data should be returned in 'ascending' or 'descending' order."
2257
+ },
2258
+ {
2259
+ "name": "standalone",
2260
+ "type": "boolean",
2261
+ "description": "The standalone prop determines whether the component will render a standalone svg\nor a <g> tag that will be included in an external svg. Set standalone to false to\ncompose ChartLine with other components within an enclosing <svg> tag."
2262
+ },
2263
+ {
2264
+ "name": "style",
2265
+ "type": "{ parent: object, data: object, labels: object }",
2266
+ "description": "The style prop specifies styles for your ChartLine. Any valid inline style properties\nwill be applied. Height, width, and padding should be specified via the height,\nwidth, and padding props, as they are used to calculate the alignment of\ncomponents within chart.\n\n\n@example {data: {fill: \"red\"}, labels: {fontSize: 12}}"
2267
+ },
2268
+ {
2269
+ "name": "theme",
2270
+ "type": "object",
2271
+ "description": "The theme prop takes a style object with nested data, labels, and parent objects.\nYou can create this object yourself, or you can use a theme provided by\nWhen using ChartLine as a solo component, implement the theme directly on\nChartLine. If you are wrapping ChartLine in ChartChart or ChartGroup,\nplease call the theme on the outermost wrapper component instead.",
2272
+ "defaultValue": "getTheme(themeColor)"
2273
+ },
2274
+ {
2275
+ "name": "themeColor",
2276
+ "type": "string",
2277
+ "description": "Specifies the theme color. Valid values are 'blue', 'green', 'multi', etc.\n\nNote: Not compatible with theme prop\n\n@example themeColor={ChartThemeColor.blue}"
2278
+ },
2279
+ {
2280
+ "name": "width",
2281
+ "type": "number",
2282
+ "description": "The width props specifies the width of the svg viewBox of the chart container\nThis value should be given as a number of pixels"
2283
+ },
2284
+ {
2285
+ "name": "x",
2286
+ "type": "number | string | Function | string[]",
2287
+ "description": "The x prop specifies how to access the X value of each data point.\nIf given as a function, it will be run on each data point, and returned value will be used.\nIf given as an integer, it will be used as an array index for array-type data points.\nIf given as a string, it will be used as a property key for object-type data points.\nIf given as an array of strings, or a string containing dots or brackets,\nit will be used as a nested object property path (for details see Lodash docs for _.get).\nIf `null` or `undefined`, the data value will be used as is (identity function/pass-through).\n\n\n@example 0, 'x', 'x.value.nested.1.thing', 'x[2].also.nested', null, d => Math.sin(d)"
2288
+ },
2289
+ {
2290
+ "name": "y",
2291
+ "type": "number | string | Function | string[]",
2292
+ "description": "The y prop specifies how to access the Y value of each data point.\nIf given as a function, it will be run on each data point, and returned value will be used.\nIf given as an integer, it will be used as an array index for array-type data points.\nIf given as a string, it will be used as a property key for object-type data points.\nIf given as an array of strings, or a string containing dots or brackets,\nit will be used as a nested object property path (for details see Lodash docs for _.get).\nIf `null` or `undefined`, the data value will be used as is (identity function/pass-through).\n\n\n@example 0, 'y', 'y.value.nested.1.thing', 'y[2].also.nested', null, d => Math.sin(d)"
2293
+ },
2294
+ {
2295
+ "name": "y0",
2296
+ "type": "number | string | Function | string[]",
2297
+ "description": "Use y0 data accessor prop to determine how the component defines the baseline y0 data.\nThis prop is useful for defining custom baselines for components like ChartLine.\nThis prop may be given in a variety of formats.\n\n\n@example 'last_quarter_profit', () => 10, 1, 'employees.salary', [\"employees\", \"salary\"]"
2298
+ }
2299
+ ]
2300
+ },
2301
+ {
2302
+ "name": "ChartPie",
2303
+ "description": "ChartPie renders a dataset as a pie chart.\n\nSee https://github.com/FormidableLabs/victory/blob/main/packages/victory-pie/src/index.d.ts",
2304
+ "props": [
2305
+ {
2306
+ "name": "allowTooltip",
2307
+ "type": "boolean",
2308
+ "description": "Specifies the tooltip capability of the container component. A value of true allows the chart to add a\nChartTooltip component to the labelComponent property. This is a shortcut to display tooltips when the labels\nproperty is also provided.",
2309
+ "defaultValue": "true"
2310
+ },
2311
+ {
2312
+ "name": "animate",
2313
+ "type": "boolean | object",
2314
+ "description": "The animate prop specifies props for VictoryAnimation to use.\nThe animate prop should also be used to specify enter and exit\ntransition configurations with the `onExit` and `onEnter` namespaces respectively.\n\n\n@example\n{duration: 500, onExit: () => {}, onEnter: {duration: 500, before: () => ({y: 0})})}"
2315
+ },
2316
+ {
2317
+ "name": "ariaDesc",
2318
+ "type": "string",
2319
+ "description": "The ariaDesc prop specifies the description of the chart/SVG to assist with\naccessibility for screen readers.\n\nNote: Overridden by the desc prop of containerComponent"
2320
+ },
2321
+ {
2322
+ "name": "ariaTitle",
2323
+ "type": "string",
2324
+ "description": "The ariaTitle prop specifies the title to be applied to the SVG to assist\naccessibility for screen readers.\n\nNote: Overridden by the title prop of containerComponent"
2325
+ },
2326
+ {
2327
+ "name": "categories",
2328
+ "type": "string[] | { x: string[], y: string[] }",
2329
+ "description": "The categories prop specifies how categorical data for a chart should be ordered.\nThis prop should be given as an array of string values, or an object with\nthese arrays of values specified for x and y. If this prop is not set,\ncategorical data will be plotted in the order it was given in the data array\n\n\n@example [\"dogs\", \"cats\", \"mice\"]"
2330
+ },
2331
+ {
2332
+ "name": "colorScale",
2333
+ "type": "string[]",
2334
+ "description": "The colorScale prop is an optional prop that defines the color scale the pie\nwill be created on. This prop should be given as an array of CSS colors, or as a string\ncorresponding to one of the built in color scales. ChartPie will automatically assign\nvalues from this color scale to the pie slices unless colors are explicitly provided in the\ndata object"
2335
+ },
2336
+ {
2337
+ "name": "constrainToVisibleArea",
2338
+ "type": "boolean",
2339
+ "description": "The constrainToVisibleArea prop determines whether to coerce tooltips so that they fit within the visible area of\nthe chart. When this prop is set to true, tooltip pointers will still point to the correct data point, but the\ncenter of the tooltip will be shifted to fit within the overall width and height of the svg Victory renders.",
2340
+ "defaultValue": "false"
2341
+ },
2342
+ {
2343
+ "name": "containerComponent",
2344
+ "type": "React.ReactElement<any>",
2345
+ "description": "The containerComponent prop takes an entire component which will be used to\ncreate a container element for standalone charts.\nThe new element created from the passed containerComponent wil be provided with\nthese props from ChartPie: height, width, children\n(the chart itself) and style. Props that are not provided by the\nchild chart component include title and desc, both of which\nare intended to add accessibility to Victory components. The more descriptive these props\nare, the more accessible your data will be for people using screen readers.\nAny of these props may be overridden by passing in props to the supplied component,\nor modified or ignored within the custom component itself. If a dataComponent is\nnot provided, ChartPie will use the default ChartContainer component.\n\n@example <ChartContainer title=\"Chart of Dog Breeds\" desc=\"This chart shows ...\" />",
2346
+ "defaultValue": "<ChartContainer />"
2347
+ },
2348
+ {
2349
+ "name": "cornerRadius",
2350
+ "type": "number | Function",
2351
+ "description": "Set the cornerRadius for every dataComponent (Slice by default) within ChartPie"
2352
+ },
2353
+ {
2354
+ "name": "data",
2355
+ "type": "any[]",
2356
+ "description": "The data prop specifies the data to be plotted,\nwhere data X-value is the slice label (string or number),\nand Y-value is the corresponding number value represented by the slice\nData should be in the form of an array of data points.\nEach data point may be any format you wish (depending on the `x` and `y` accessor props),\nbut by default, an object with x and y properties is expected.\n\n@example [{x: 1, y: 2}, {x: 2, y: 3}], [[1, 2], [2, 3]],\n[[{x: \"a\", y: 1}, {x: \"b\", y: 2}], [{x: \"a\", y: 2}, {x: \"b\", y: 3}]]"
2357
+ },
2358
+ {
2359
+ "name": "dataComponent",
2360
+ "type": "React.ReactElement<any>",
2361
+ "description": "The dataComponent prop takes an entire, HTML-complete data component which will be used to\ncreate slices for each datum in the pie chart. The new element created from the passed\ndataComponent will have the property datum set by the pie chart for the point it renders;\nproperties style and pathFunction calculated by ChartPie; an index property set\ncorresponding to the location of the datum in the data provided to the pie; events bound to\nthe ChartPie; and the d3 compatible slice object.\nIf a dataComponent is not provided, ChartPie's Slice component will be used."
2362
+ },
2363
+ {
2364
+ "name": "endAngle",
2365
+ "type": "number",
2366
+ "description": "The overall end angle of the pie in degrees. This prop is used in conjunction with\nstartAngle to create a pie that spans only a segment of a circle."
2367
+ },
2368
+ {
2369
+ "name": "eventKey",
2370
+ "type": "number | string | Function",
2371
+ "description": "Similar to data accessor props `x` and `y`, this prop may be used to functionally\nassign eventKeys to data"
2372
+ },
2373
+ {
2374
+ "name": "events",
2375
+ "type": "object[]",
2376
+ "description": "The event prop takes an array of event objects. Event objects are composed of\na target, an eventKey, and eventHandlers. Targets may be any valid style namespace\nfor a given component, so \"data\" and \"labels\" are all valid targets for ChartPie\nevents. The eventKey may optionally be used to select a single element by index rather than\nan entire set. The eventHandlers object should be given as an object whose keys are standard\nevent names (i.e. onClick) and whose values are event callbacks. The return value\nof an event handler is used to modify elements. The return value should be given\nas an object or an array of objects with optional target and eventKey keys,\nand a mutation key whose value is a function. The target and eventKey keys\nwill default to those corresponding to the element the event handler was attached to.\nThe mutation function will be called with the calculated props for the individual selected\nelement (i.e. a single bar), and the object returned from the mutation function\nwill override the props of the selected element via object assignment.\n\n\n@example\nevents={[\n {\n target: \"data\",\n eventKey: 1,\n eventHandlers: {\n onClick: () => {\n return [\n {\n eventKey: 2,\n mutation: (props) => {\n return {style: merge({}, props.style, {fill: \"orange\"})};\n }\n }, {\n eventKey: 2,\n target: \"labels\",\n mutation: () => {\n return {text: \"hey\"};\n }\n }\n ];\n }\n }\n }\n]}"
2377
+ },
2378
+ {
2379
+ "name": "externalEventMutations",
2380
+ "type": "object[]",
2381
+ "description": "ChartPie uses the standard externalEventMutations prop."
2382
+ },
2383
+ {
2384
+ "name": "groupComponent",
2385
+ "type": "React.ReactElement<any>",
2386
+ "description": "The groupComponent prop takes an entire component which will be used to\ncreate group elements for use within container elements. This prop defaults\nto a <g> tag on web, and a react-native-svg <G> tag on mobile"
2387
+ },
2388
+ {
2389
+ "name": "hasPatterns",
2390
+ "type": "boolean | boolean[]",
2391
+ "description": "The hasPatterns prop is an optional prop that indicates whether a pattern is shown for a chart.\nSVG patterns are dynamically generated (unique to each chart) in order to apply colors from the selected\ncolor theme or custom color scale. Those generated patterns are applied in a specific order (via a URL), similar\nto the color theme ordering defined by PatternFly. If the multi-color theme was in use; for example, colorized\npatterns would be displayed in that same order. Create custom patterns via the patternScale prop.\n\nNote: Not all components are supported; for example, ChartLine, ChartBullet, ChartThreshold, etc.\n\n@example hasPatterns={ true }\n@example hasPatterns={[ true, true, false ]}"
2392
+ },
2393
+ {
2394
+ "name": "height",
2395
+ "type": "number",
2396
+ "description": "Specifies the height the svg viewBox of the chart container. This value should be given as a\nnumber of pixels.\n\nBecause Victory renders responsive containers, the width and height props do not determine the width and\nheight of the chart in number of pixels, but instead define an aspect ratio for the chart. The exact number of\npixels will depend on the size of the container the chart is rendered into.\n\nNote: When adding a legend, height (the overall SVG height) may need to be larger than pieHeight (the pie size)\nin order to accommodate the extra legend.\n\nBy default, pieHeight is the min. of either height or width. This covers most use cases in order to accommodate\nlegends within the same SVG. However, pieHeight (not height) may need to be set in order to adjust the pie height.\n\nTypically, the parent container is set to the same width in order to maintain the aspect ratio.",
2397
+ "defaultValue": "theme.pie.height"
2398
+ },
2399
+ {
2400
+ "name": "innerRadius",
2401
+ "type": "number | Function",
2402
+ "description": "When creating a donut chart, this prop determines the number of pixels between\nthe center of the chart and the inner edge. When this prop is set to zero\na regular pie chart is rendered."
2403
+ },
2404
+ {
2405
+ "name": "labelComponent",
2406
+ "type": "React.ReactElement<any>",
2407
+ "description": "The labelComponent prop takes in an entire label component which will be used\nto create a label for the area. The new element created from the passed labelComponent\nwill be supplied with the following properties: x, y, index, data, verticalAnchor,\ntextAnchor, angle, style, text, and events. any of these props may be overridden\nby passing in props to the supplied component, or modified or ignored within\nthe custom component itself. If labelComponent is omitted, a new ChartLabel\nwill be created with props described above. This labelComponent prop should be used to\nprovide a series label for ChartPie. If individual labels are required for each\ndata point, they should be created by composing ChartPie with VictoryScatter",
2408
+ "defaultValue": "allowTooltip ? (\n <ChartTooltip constrainToVisibleArea={constrainToVisibleArea} theme={theme} />\n) : undefined"
2409
+ },
2410
+ {
2411
+ "name": "labelPosition",
2412
+ "type": "string | Function",
2413
+ "description": "The labelPosition prop specifies the angular position of each label relative to its corresponding slice.\nThis prop should be given as \"startAngle\", \"endAngle\", \"centroid\", or as a function that returns one of these\nvalues. When this prop is not given, the label will be positioned at the centroid of each slice."
2414
+ },
2415
+ {
2416
+ "name": "labelRadius",
2417
+ "type": "number | Function",
2418
+ "description": "The labelRadius prop defines the radius of the arc that will be used for positioning each slice label.\nIf this prop is not set, the label radius will default to the radius of the pie + label padding."
2419
+ },
2420
+ {
2421
+ "name": "labels",
2422
+ "type": "string[] | number[] | ((data: any) => string | number | null)",
2423
+ "description": "The labels prop defines labels that will appear above each bar in your chart.\nThis prop should be given as an array of values or as a function of data.\nIf given as an array, the number of elements in the array should be equal to\nthe length of the data array. Labels may also be added directly to the data object\nlike data={[{x: 1, y: 1, label: \"first\"}]}.\n\n@example [\"spring\", \"summer\", \"fall\", \"winter\"], (datum) => datum.title"
2424
+ },
2425
+ {
2426
+ "name": "legendAllowWrap",
2427
+ "type": "boolean | ((extraHeight: number) => void)",
2428
+ "description": "Allows legend items to wrap onto the next line if the chart is not wide enough.\n\nNote that the chart's SVG height and width are 100% by default, so it can be responsive itself. However, if you\ndefine the height and width of the chart's parent container, you must accommodate for extra legend height due to\nlegend items wrapping onto the next line. When the height of the chart's parent container is too small, some legend\nitems may not be visible.\n\nAlternatively, a callback function may be provided, which will be called after the legend's itemsPerRow property\nhas been calculated. The value provided can be used to increase the chart's parent container height as legend\nitems wrap onto the next line. If no adjustment is necessary, the value will be zero.\n\nNote: This is overridden by the legendItemsPerRow property",
2429
+ "defaultValue": "false"
2430
+ },
2431
+ {
2432
+ "name": "legendComponent",
2433
+ "type": "React.ReactElement<any>",
2434
+ "description": "The legend component to render with chart.\n\nNote: Use legendData so the legend width can be calculated and positioned properly.\nDefault legend properties may be applied",
2435
+ "defaultValue": "<ChartLegend />"
2436
+ },
2437
+ {
2438
+ "name": "legendData",
2439
+ "type": "{\n name?: string;\n symbol?: {\n fill?: string;\n type?: string;\n };\n}[]",
2440
+ "description": "Specify data via the data prop. ChartLegend expects data as an\narray of objects with name (required), symbol, and labels properties.\nThe data prop must be given as an array.\n\n@example legendData={[{ name: `GBps capacity - 45%` }, { name: 'Unused' }]}"
2441
+ },
2442
+ {
2443
+ "name": "legendDirection",
2444
+ "type": "'ltr' | 'rtl'",
2445
+ "description": "Text direction of the legend labels.",
2446
+ "defaultValue": "'ltr'"
2447
+ },
2448
+ {
2449
+ "name": "legendOrientation",
2450
+ "type": "'horizontal' | 'vertical'",
2451
+ "description": "The orientation prop takes a string that defines whether legend data\nare displayed in a row or column. When orientation is \"horizontal\",\nlegend items will be displayed in a single row. When orientation is\n\"vertical\", legend items will be displayed in a single column. Line\nand text-wrapping is not currently supported, so \"vertical\"\norientation is both the default setting and recommended for\ndisplaying many series of data.",
2452
+ "defaultValue": "theme.legend.orientation"
2453
+ },
2454
+ {
2455
+ "name": "legendPosition",
2456
+ "type": "'bottom' | 'right'",
2457
+ "description": "The legend position relation to the pie chart. Valid values are 'bottom' and 'right'\n\nNote: When adding a legend, padding may need to be adjusted in order to accommodate the extra legend. In some\ncases, the legend may not be visible until enough padding is applied.",
2458
+ "defaultValue": "\"right\""
2459
+ },
2460
+ {
2461
+ "name": "name",
2462
+ "type": "string",
2463
+ "description": "The name prop is typically used to reference a component instance when defining shared events. However, this\noptional prop may also be applied to child elements as an ID prefix. This is a workaround to ensure Victory\nbased components output unique IDs when multiple charts appear in a page."
2464
+ },
2465
+ {
2466
+ "name": "origin",
2467
+ "type": "{ x: number, y: number }",
2468
+ "description": "Victory components will pass an origin prop is to define the center point in svg coordinates for polar charts.\n\nNote: It will not typically be necessary to set an origin prop manually"
2469
+ },
2470
+ {
2471
+ "name": "padAngle",
2472
+ "type": "number | Function",
2473
+ "description": "The padAngle prop determines the amount of separation between adjacent data slices\nin number of degrees"
2474
+ },
2475
+ {
2476
+ "name": "padding",
2477
+ "type": "number | { top: number, bottom: number, left: number, right: number }",
2478
+ "description": "The padding props specifies the amount of padding in number of pixels between\nthe edge of the chart and any rendered child components. This prop can be given\nas a number or as an object with padding specified for top, bottom, left\nand right."
2479
+ },
2480
+ {
2481
+ "name": "patternScale",
2482
+ "type": "string[]",
2483
+ "description": "The patternScale prop is an optional prop that defines patterns to apply, where applicable. This prop should be\ngiven as a string array of pattern URLs. Patterns will be assigned to children by index and will repeat when there\nare more children than patterns in the provided patternScale. Use null to omit the pattern for a given index.\n\nNote: Not all components are supported; for example, ChartLine, ChartBullet, ChartThreshold, etc.\n\n@example patternScale={[ 'url(\"#pattern1\")', 'url(\"#pattern2\")', null ]}"
2484
+ },
2485
+ {
2486
+ "name": "radius",
2487
+ "type": "number | Function",
2488
+ "description": "Specifies the radius of the chart. If this property is not provided it is computed\nfrom width, height, and padding props"
2489
+ },
2490
+ {
2491
+ "name": "sortKey",
2492
+ "type": "number | string | Function | string[]",
2493
+ "description": "Use the sortKey prop to indicate how data should be sorted. This prop\nis given directly to the lodash sortBy function to be executed on the final dataset."
2494
+ },
2495
+ {
2496
+ "name": "sortOrder",
2497
+ "type": "string",
2498
+ "description": "The sortOrder prop specifies whether sorted data should be returned in 'ascending' or 'descending' order."
2499
+ },
2500
+ {
2501
+ "name": "standalone",
2502
+ "type": "boolean",
2503
+ "description": "The standalone prop determines whether the component will render a standalone svg\nor a <g> tag that will be included in an external svg. Set standalone to false to\ncompose ChartPie with other components within an enclosing <svg> tag.",
2504
+ "defaultValue": "true"
2505
+ },
2506
+ {
2507
+ "name": "startAngle",
2508
+ "type": "number",
2509
+ "description": "The overall start angle of the pie in degrees. This prop is used in conjunction with\nendAngle to create a pie that spans only a segment of a circle."
2510
+ },
2511
+ {
2512
+ "name": "style",
2513
+ "type": "{ parent: object, data: object, labels: object }",
2514
+ "description": "The style prop specifies styles for your pie. ChartPie relies on Radium,\nso valid Radium style objects should work for this prop. Height, width, and\npadding should be specified via the height, width, and padding props.\n\n\n@example {data: {stroke: \"black\"}, label: {fontSize: 10}}"
2515
+ },
2516
+ {
2517
+ "name": "theme",
2518
+ "type": "object",
2519
+ "description": "The theme prop takes a style object with nested data, labels, and parent objects.\nYou can create this object yourself, or you can use a theme provided by\nWhen using ChartPie as a solo component, implement the theme directly on\nChartPie. If you are wrapping ChartPie in ChartChart or ChartGroup,\nplease call the theme on the outermost wrapper component instead.",
2520
+ "defaultValue": "getTheme(themeColor)"
2521
+ },
2522
+ {
2523
+ "name": "themeColor",
2524
+ "type": "string",
2525
+ "description": "Specifies the theme color. Valid values are 'blue', 'green', 'multi', etc.\n\nNote: Not compatible with theme prop\n\n@example themeColor={ChartThemeColor.blue}"
2526
+ },
2527
+ {
2528
+ "name": "width",
2529
+ "type": "number",
2530
+ "description": "Specifies the width of the svg viewBox of the chart container. This value should be given as a number of pixels.\n\nBecause Victory renders responsive containers, the width and height props do not determine the width and\nheight of the chart in number of pixels, but instead define an aspect ratio for the chart. The exact number of\npixels will depend on the size of the container the chart is rendered into. Typically, the parent container is set\nto the same width in order to maintain the aspect ratio.",
2531
+ "defaultValue": "theme.pie.width"
2532
+ },
2533
+ {
2534
+ "name": "x",
2535
+ "type": "number | string | Function | string[]",
2536
+ "description": "The x prop specifies how to access the X value of each data point.\nIf given as a function, it will be run on each data point, and returned value will be used.\nIf given as an integer, it will be used as an array index for array-type data points.\nIf given as a string, it will be used as a property key for object-type data points.\nIf given as an array of strings, or a string containing dots or brackets,\nit will be used as a nested object property path (for details see Lodash docs for _.get).\nIf `null` or `undefined`, the data value will be used as is (identity function/pass-through).\n\n\n@example 0, 'x', 'x.value.nested.1.thing', 'x[2].also.nested', null, d => Math.sin(d)"
2537
+ },
2538
+ {
2539
+ "name": "y",
2540
+ "type": "number | string | Function | string[]",
2541
+ "description": "The y prop specifies how to access the Y value of each data point.\nIf given as a function, it will be run on each data point, and returned value will be used.\nIf given as an integer, it will be used as an array index for array-type data points.\nIf given as a string, it will be used as a property key for object-type data points.\nIf given as an array of strings, or a string containing dots or brackets,\nit will be used as a nested object property path (for details see Lodash docs for _.get).\nIf `null` or `undefined`, the data value will be used as is (identity function/pass-through).\n\n\n@example 0, 'y', 'y.value.nested.1.thing', 'y[2].also.nested', null, d => Math.sin(d)"
2542
+ }
2543
+ ]
2544
+ },
2545
+ {
2546
+ "name": "ChartScatter",
2547
+ "description": "ChartScatter renders a dataset as a series of points. ChartScatter can be composed with Chart to create scatter plots.\n\nSee https://github.com/FormidableLabs/victory/blob/main/packages/victory-scatter/src/index.d.ts",
2548
+ "props": [
2549
+ {
2550
+ "name": "animate",
2551
+ "type": "boolean | object",
2552
+ "description": "The animate prop specifies props for VictoryAnimation to use.\nThe animate prop should also be used to specify enter and exit\ntransition configurations with the `onExit` and `onEnter` namespaces respectively.\n\n\n@example\n{duration: 500, onExit: () => {}, onEnter: {duration: 500, before: () => ({y: 0})})}"
2553
+ },
2554
+ {
2555
+ "name": "bubbleProperty",
2556
+ "type": "string",
2557
+ "description": "The bubbleProperty prop indicates which property of the data object should be used\nto scale data points in a bubble chart"
2558
+ },
2559
+ {
2560
+ "name": "categories",
2561
+ "type": "string[] | { x: string[], y: string[] }",
2562
+ "description": "The categories prop specifies how categorical data for a chart should be ordered.\nThis prop should be given as an array of string values, or an object with\nthese arrays of values specified for x and y. If this prop is not set,\ncategorical data will be plotted in the order it was given in the data array\n\n\n@example [\"dogs\", \"cats\", \"mice\"]"
2563
+ },
2564
+ {
2565
+ "name": "containerComponent",
2566
+ "type": "React.ReactElement<any>",
2567
+ "description": "The containerComponent prop takes an entire component which will be used to\ncreate a container element for standalone charts.\nThe new element created from the passed containerComponent wil be provided with\nthese props from ChartScatter: height, width, children\n(the chart itself) and style. Props that are not provided by the\nchild chart component include title and desc, both of which\nare intended to add accessibility to Victory components. The more descriptive these props\nare, the more accessible your data will be for people using screen readers.\nAny of these props may be overridden by passing in props to the supplied component,\nor modified or ignored within the custom component itself. If a dataComponent is\nnot provided, ChartScatter will use the default ChartContainer component.\n\n@example <ChartContainer title=\"Chart of Dog Breeds\" desc=\"This chart shows...\" />",
2568
+ "defaultValue": "<ChartContainer />"
2569
+ },
2570
+ {
2571
+ "name": "data",
2572
+ "type": "any[]",
2573
+ "description": "The data prop specifies the data to be plotted. Data should be in the form of an array\nof data points, or an array of arrays of data points for multiple datasets.\nEach data point may be any format you wish (depending on the `x` and `y` accessor props),\nbut by default, an object with x and y properties is expected.\n\n@example [{x: 1, y: 2}, {x: 2, y: 3}], [[1, 2], [2, 3]],\n[[{x: \"a\", y: 1}, {x: \"b\", y: 2}], [{x: \"a\", y: 2}, {x: \"b\", y: 3}]]"
2574
+ },
2575
+ {
2576
+ "name": "dataComponent",
2577
+ "type": "React.ReactElement<any>",
2578
+ "description": "The dataComponent prop takes an entire component which will be used to create an area.\nThe new element created from the passed dataComponent will be provided with the\nfollowing properties calculated by ChartScatter: a scale, style, events, interpolation,\nand an array of modified data objects (including x, y, and calculated y0 and y1).\nAny of these props may be overridden by passing in props to the supplied component,\nor modified or ignored within the custom component itself. If a dataComponent is\nnot provided, ChartScatter will use its default Line component."
2579
+ },
2580
+ {
2581
+ "name": "domain",
2582
+ "type": "number[] | { x: number[], y: number[] }",
2583
+ "description": "The domain prop describes the range of values your chart will cover. This prop can be\ngiven as a array of the minimum and maximum expected values for your bar chart,\nor as an object that specifies separate arrays for x and y.\nIf this prop is not provided, a domain will be calculated from data, or other\navailable information.\n\n\n@example [low, high], { x: [low, high], y: [low, high] }\n\n[-1, 1], {x: [0, 100], y: [0, 1]}"
2584
+ },
2585
+ {
2586
+ "name": "domainPadding",
2587
+ "type": "number | number[] | { x: number[], y: number[] }",
2588
+ "description": "The domainPadding prop specifies a number of pixels of padding to add to the\nbeginning and end of a domain. This prop is useful for explicitly spacing ticks farther\nfrom the origin to prevent crowding. This prop should be given as an object with\nnumbers specified for x and y.\n\n\n@example [left, right], { x: [left, right], y: [bottom, top] }\n\n{x: [10, -10], y: 5}"
2589
+ },
2590
+ {
2591
+ "name": "eventKey",
2592
+ "type": "number | string | Function",
2593
+ "description": "Similar to data accessor props `x` and `y`, this prop may be used to functionally\nassign eventKeys to data"
2594
+ },
2595
+ {
2596
+ "name": "events",
2597
+ "type": "object[]",
2598
+ "description": "The event prop take an array of event objects. Event objects are composed of\na target, an eventKey, and eventHandlers. Targets may be any valid style namespace\nfor a given component, so \"data\" and \"labels\" are all valid targets for ChartScatter events.\nSince ChartScatter only renders a single element, the eventKey property is not used.\nThe eventHandlers object should be given as an object whose keys are standard\nevent names (i.e. onClick) and whose values are event callbacks. The return value\nof an event handler is used to modify elements. The return value should be given\nas an object or an array of objects with optional target and eventKey keys,\nand a mutation key whose value is a function. The target and eventKey keys\nwill default to those corresponding to the element the event handler was attached to.\nThe mutation function will be called with the calculated props for the individual selected\nelement (i.e. a line), and the object returned from the mutation function\nwill override the props of the selected element via object assignment.\n\n\n@example\nevents={[\n {\n target: \"data\",\n eventHandlers: {\n onClick: () => {\n return [\n {\n mutation: (props) => {\n return {style: merge({}, props.style, {stroke: \"orange\"})};\n }\n }, {\n target: \"labels\",\n mutation: () => {\n return {text: \"hey\"};\n }\n }\n ];\n }\n }\n }\n]}"
2599
+ },
2600
+ {
2601
+ "name": "externalEventMutations",
2602
+ "type": "object[]",
2603
+ "description": "ChartScatter uses the standard externalEventMutations prop."
2604
+ },
2605
+ {
2606
+ "name": "groupComponent",
2607
+ "type": "React.ReactElement<any>",
2608
+ "description": "The groupComponent prop takes an entire component which will be used to\ncreate group elements for use within container elements. This prop defaults\nto a <g> tag on web, and a react-native-svg <G> tag on mobile"
2609
+ },
2610
+ {
2611
+ "name": "height",
2612
+ "type": "number",
2613
+ "description": "The height props specifies the height the svg viewBox of the chart container.\nThis value should be given as a number of pixels"
2614
+ },
2615
+ {
2616
+ "name": "horizontal",
2617
+ "type": "boolean",
2618
+ "description": "The horizontal prop determines whether data will be plotted horizontally.\nWhen this prop is set to true, the independent variable will be plotted on the y axis\nand the dependent variable will be plotted on the x axis."
2619
+ },
2620
+ {
2621
+ "name": "labelComponent",
2622
+ "type": "React.ReactElement<any>",
2623
+ "description": "The labelComponent prop takes in an entire label component which will be used\nto create a label for the area. The new element created from the passed labelComponent\nwill be supplied with the following properties: x, y, index, data, verticalAnchor,\ntextAnchor, angle, style, text, and events. any of these props may be overridden\nby passing in props to the supplied component, or modified or ignored within\nthe custom component itself. If labelComponent is omitted, a new ChartLabel\nwill be created with props described above. This labelComponent prop should be used to\nprovide a series label for ChartScatter. If individual labels are required for each\ndata point, they should be created by composing ChartScatter with VictoryScatter"
2624
+ },
2625
+ {
2626
+ "name": "labels",
2627
+ "type": "string[] | number[] | ((data: any) => string | number | null)",
2628
+ "description": "The labels prop defines labels that will appear above each bar in your chart.\nThis prop should be given as an array of values or as a function of data.\nIf given as an array, the number of elements in the array should be equal to\nthe length of the data array. Labels may also be added directly to the data object\nlike data={[{x: 1, y: 1, label: \"first\"}]}.\n\n@example [\"spring\", \"summer\", \"fall\", \"winter\"], (datum) => datum.title"
2629
+ },
2630
+ {
2631
+ "name": "maxBubbleSize",
2632
+ "type": "number",
2633
+ "description": "The maxBubbleSize prop sets an upper limit for scaling data points in a bubble chart"
2634
+ },
2635
+ {
2636
+ "name": "maxDomain",
2637
+ "type": "number | { x?: number; y?: number }",
2638
+ "description": "The maxDomain prop defines a maximum domain value for a chart. This prop is useful in situations where the maximum\ndomain of a chart is static, while the minimum value depends on data or other variable information. If the domain\nprop is set in addition to maximumDomain, domain will be used.\n\nNote: The x value supplied to the maxDomain prop refers to the independent variable, and the y value refers to the\ndependent variable. This may cause confusion in horizontal charts, as the independent variable will corresponds to\nthe y axis.\n\n@example\n\nmaxDomain={0}\nmaxDomain={{ y: 0 }}"
2639
+ },
2640
+ {
2641
+ "name": "minBubbleSize",
2642
+ "type": "number",
2643
+ "description": "The minBubbleSize prop sets a lower limit for scaling data points in a bubble chart"
2644
+ },
2645
+ {
2646
+ "name": "minDomain",
2647
+ "type": "number | { x?: number; y?: number }",
2648
+ "description": "The minDomain prop defines a minimum domain value for a chart. This prop is useful in situations where the minimum\ndomain of a chart is static, while the maximum value depends on data or other variable information. If the domain\nprop is set in addition to minimumDomain, domain will be used.\n\nNote: The x value supplied to the minDomain prop refers to the independent variable, and the y value refers to the\ndependent variable. This may cause confusion in horizontal charts, as the independent variable will corresponds to\nthe y axis.\n\n@example\n\nminDomain={0}\nminDomain={{ y: 0 }}"
2649
+ },
2650
+ {
2651
+ "name": "name",
2652
+ "type": "string",
2653
+ "description": "The name prop is used to reference a component instance when defining shared events."
2654
+ },
2655
+ {
2656
+ "name": "origin",
2657
+ "type": "{ x: number, y: number }",
2658
+ "description": "Victory components will pass an origin prop is to define the center point in svg coordinates for polar charts.\n\nNote: It will not typically be necessary to set an origin prop manually"
2659
+ },
2660
+ {
2661
+ "name": "padding",
2662
+ "type": "number | { top: number, bottom: number, left: number, right: number }",
2663
+ "description": "The padding props specifies the amount of padding in number of pixels between\nthe edge of the chart and any rendered child components. This prop can be given\nas a number or as an object with padding specified for top, bottom, left\nand right."
2664
+ },
2665
+ {
2666
+ "name": "range",
2667
+ "type": "number[] | { x: number[], y: number[] }",
2668
+ "description": "The range prop describes the dimensions over which data may be plotted. For cartesian coordinate systems, this\ncorresponds to minimum and maximum svg coordinates in the x and y dimension. In polar coordinate systems this\ncorresponds to a range of angles and radii. When this value is not given it will be calculated from the width,\nheight, and padding, or from the startAngle and endAngle in the case of polar charts. All components in a given\nchart must share the same range, so setting this prop on children nested within Chart or\nChartGroup will have no effect. This prop is usually not set manually.\n\n\n@example [low, high] | { x: [low, high], y: [low, high] }\n\nCartesian: range={{ x: [50, 250], y: [50, 250] }}\nPolar: range={{ x: [0, 360], y: [0, 250] }}"
2669
+ },
2670
+ {
2671
+ "name": "samples",
2672
+ "type": "number",
2673
+ "description": "The samples prop specifies how many individual points to plot when plotting\ny as a function of x. Samples is ignored if x props are provided instead."
2674
+ },
2675
+ {
2676
+ "name": "scale",
2677
+ "type": "string | { x: string, y: string }",
2678
+ "description": "The scale prop determines which scales your chart should use. This prop can be\ngiven as a string specifying a supported scale (\"linear\", \"time\", \"log\", \"sqrt\"),\nas a d3 scale function, or as an object with scales specified for x and y\n\n\n@example d3Scale.time(), {x: \"linear\", y: \"log\"}"
2679
+ },
2680
+ {
2681
+ "name": "singleQuadrantDomainPadding",
2682
+ "type": "boolean | { x?: boolean; y?: boolean }",
2683
+ "description": "By default domainPadding is coerced to existing quadrants. This means that if a given domain only includes positive\nvalues, no amount of padding applied by domainPadding will result in a domain with negative values. This is the\ndesired behavior in most cases. For users that need to apply padding without regard to quadrant, the\nsingleQuadrantDomainPadding prop may be used. This prop may be given as a boolean or an object with boolean values\nspecified for \"x\" and/or \"y\". When this prop is false (or false for a given dimension), padding will be applied\nwithout regard to quadrant. If this prop is not specified, domainPadding will be coerced to existing quadrants.\n\nNote: The x value supplied to the singleQuadrantDomainPadding prop refers to the independent variable, and the y\nvalue refers to the dependent variable. This may cause confusion in horizontal charts, as the independent variable\nwill corresponds to the y axis.\n\n@example\n\nsingleQuadrantDomainPadding={false}\nsingleQuadrantDomainPadding={{ x: false }}"
2684
+ },
2685
+ {
2686
+ "name": "size",
2687
+ "type": "number | ((data: any) => number)",
2688
+ "description": "The size prop determines how to scale each data point"
2689
+ },
2690
+ {
2691
+ "name": "sortKey",
2692
+ "type": "number | string | Function | string[]",
2693
+ "description": "Use the sortKey prop to indicate how data should be sorted. This prop\nis given directly to the lodash sortBy function to be executed on the\nfinal dataset."
2694
+ },
2695
+ {
2696
+ "name": "sortOrder",
2697
+ "type": "string",
2698
+ "description": "The sortOrder prop specifies whether sorted data should be returned in 'ascending' or 'descending' order."
2699
+ },
2700
+ {
2701
+ "name": "standalone",
2702
+ "type": "boolean",
2703
+ "description": "The standalone prop determines whether the component will render a standalone svg\nor a <g> tag that will be included in an external svg. Set standalone to false to\ncompose ChartScatter with other components within an enclosing <svg> tag."
2704
+ },
2705
+ {
2706
+ "name": "style",
2707
+ "type": "{ parent: object, data: object, labels: object }",
2708
+ "description": "The style prop specifies styles for your ChartScatter. Any valid inline style properties\nwill be applied. Height, width, and padding should be specified via the height,\nwidth, and padding props, as they are used to calculate the alignment of\ncomponents within chart.\n\n\n@example {data: {fill: \"red\"}, labels: {fontSize: 12}}"
2709
+ },
2710
+ {
2711
+ "name": "symbol",
2712
+ "type": "string | Function",
2713
+ "description": "The symbol prop determines which symbol should be drawn to represent data points. Options are: \"circle\", \"cross\",\n\"diamond\", \"plus\", \"minus\", \"square\", \"star\", \"triangleDown\", \"triangleUp\"."
2714
+ },
2715
+ {
2716
+ "name": "theme",
2717
+ "type": "object",
2718
+ "description": "The theme prop takes a style object with nested data, labels, and parent objects.\nYou can create this object yourself, or you can use a theme provided by\nWhen using ChartScatter as a solo component, implement the theme directly on\nChartScatter. If you are wrapping ChartScatter in ChartChart or ChartGroup,\nplease call the theme on the outermost wrapper component instead.",
2719
+ "defaultValue": "getTheme(themeColor)"
2720
+ },
2721
+ {
2722
+ "name": "themeColor",
2723
+ "type": "string",
2724
+ "description": "Specifies the theme color. Valid values are 'blue', 'green', 'multi', etc.\n\nNote: Not compatible with theme prop\n\n@example themeColor={ChartThemeColor.blue}"
2725
+ },
2726
+ {
2727
+ "name": "width",
2728
+ "type": "number",
2729
+ "description": "The width props specifies the width of the svg viewBox of the chart container\nThis value should be given as a number of pixels"
2730
+ },
2731
+ {
2732
+ "name": "x",
2733
+ "type": "number | string | Function | string[]",
2734
+ "description": "The x prop specifies how to access the X value of each data point.\nIf given as a function, it will be run on each data point, and returned value will be used.\nIf given as an integer, it will be used as an array index for array-type data points.\nIf given as a string, it will be used as a property key for object-type data points.\nIf given as an array of strings, or a string containing dots or brackets,\nit will be used as a nested object property path (for details see Lodash docs for _.get).\nIf `null` or `undefined`, the data value will be used as is (identity function/pass-through).\n\n\n@example 0, 'x', 'x.value.nested.1.thing', 'x[2].also.nested', null, d => Math.sin(d)"
2735
+ },
2736
+ {
2737
+ "name": "y",
2738
+ "type": "number | string | Function | string[]",
2739
+ "description": "The y prop specifies how to access the Y value of each data point.\nIf given as a function, it will be run on each data point, and returned value will be used.\nIf given as an integer, it will be used as an array index for array-type data points.\nIf given as a string, it will be used as a property key for object-type data points.\nIf given as an array of strings, or a string containing dots or brackets,\nit will be used as a nested object property path (for details see Lodash docs for _.get).\nIf `null` or `undefined`, the data value will be used as is (identity function/pass-through).\n\n\n@example 0, 'y', 'y.value.nested.1.thing', 'y[2].also.nested', null, d => Math.sin(d)"
2740
+ },
2741
+ {
2742
+ "name": "y0",
2743
+ "type": "number | string | Function | string[]",
2744
+ "description": "Use y0 data accessor prop to determine how the component defines the baseline y0 data.\nThis prop is useful for defining custom baselines for components like ChartScatter.\nThis prop may be given in a variety of formats.\n\n\n@example 'last_quarter_profit', () => 10, 1, 'employees.salary', [\"employees\", \"salary\"]"
2745
+ }
2746
+ ]
2747
+ },
2748
+ {
2749
+ "name": "ChartVoronoiContainer",
2750
+ "description": "ChartVoronoiContainer adds the ability to associate a mouse position with the data point(s) closest to it. When this\ncontainer is added to a chart, changes in mouse position will add the active prop to data and label components\nclosest to the current mouse position. The closeness of data points to a given position is determined by calculating\na voronoi diagram based on the data of every child VictoryVoronoiContainer renders. This container is useful for\nadding hover interactions, like tooltips, to small data points, or charts with dense or overlapping data.\n\nSee https://github.com/FormidableLabs/victory/blob/main/packages/victory-voronoi-container/src/index.d.ts",
2751
+ "props": [
2752
+ {
2753
+ "name": "activateData",
2754
+ "type": "boolean",
2755
+ "description": "When the activateData prop is set to true, the active prop will be set to true on all\ndata components within a voronoi area. When this prop is set to false, the onActivated\nand onDeactivated callbacks will still fire, but no mutations to data components will\noccur via Victory’s event system."
2756
+ },
2757
+ {
2758
+ "name": "activateLabels",
2759
+ "type": "boolean",
2760
+ "description": "When the activateLabels prop is set to true, the active prop will be set to true on all\nlabels corresponding to points within a voronoi area. When this prop is set to false,\nthe onActivated and onDeactivated callbacks will still fire, but no mutations to label\ncomponents will occur via Victory’s event system. Labels defined directly on\nChartVoronoiContainer via the labels prop will still appear when this prop is set to false."
2761
+ },
2762
+ {
2763
+ "name": "className",
2764
+ "type": "string",
2765
+ "description": "The className prop specifies a className that will be applied to the outermost div rendered by the container"
2766
+ },
2767
+ {
2768
+ "name": "constrainToVisibleArea",
2769
+ "type": "boolean",
2770
+ "description": "The constrainToVisibleArea prop determines whether to coerce tooltips so that they fit within the visible area of\nthe chart. When this prop is set to true, tooltip pointers will still point to the correct data point, but the\ncenter of the tooltip will be shifted to fit within the overall width and height of the svg Victory renders.",
2771
+ "defaultValue": "false"
2772
+ },
2773
+ {
2774
+ "name": "containerId",
2775
+ "type": "number | string",
2776
+ "description": "The containerId prop may be used to set a deterministic id for the container. When a containerId is not manually\nset, a unique id will be generated. It is usually necessary to set deterministic ids for automated testing."
2777
+ },
2778
+ {
2779
+ "name": "desc",
2780
+ "type": "string",
2781
+ "description": "The desc prop specifies the description of the chart/SVG to assist with\naccessibility for screen readers. The more info about the chart provided in\nthe description, the more usable it will be for people using screen readers.\nThis prop defaults to an empty string.\n\n@example \"Golden retrievers make up 30%, Labs make up 25%, and other dog breeds are\nnot represented above 5% each.\""
2782
+ },
2783
+ {
2784
+ "name": "disable",
2785
+ "type": "boolean",
2786
+ "description": "When the disable prop is set to true, ChartVoronoiContainer events will not fire."
2787
+ },
2788
+ {
2789
+ "name": "events",
2790
+ "type": "React.DOMAttributes<any>",
2791
+ "description": "The events prop attaches arbitrary event handlers to the container component.\nEvent handlers passed from other Victory components are called with their\ncorresponding events as well as scale, style, width, height, and data when\napplicable. Use the invert method to convert event coordinate information to\ndata. `scale.x.invert(evt.offsetX)`.\n\n@example {onClick: (evt) => alert(`x: ${evt.clientX}, y: ${evt.clientY}`)}"
2792
+ },
2793
+ {
2794
+ "name": "height",
2795
+ "type": "number",
2796
+ "description": "The height props specifies the height the svg viewBox of the container.\nThis value should be given as a number of pixels. If no height prop\nis given, the height prop from the child component passed will be used."
2797
+ },
2798
+ {
2799
+ "name": "labelComponent",
2800
+ "type": "React.ReactElement<any>",
2801
+ "description": "The labelComponent prop specified the component that will be rendered when labels are defined\non ChartVoronoiContainer. If the labels prop is omitted, no label component will be rendered.",
2802
+ "defaultValue": "<ChartTooltip />"
2803
+ },
2804
+ {
2805
+ "name": "labels",
2806
+ "type": "(point: any, index: number, points: any[]) => string",
2807
+ "description": "When a labels prop is provided to ChartVoronoiContainer it will render a label component\nrather than activating labels on the child components it renders. This is useful for\ncreating multi- point tooltips. This prop should be given as a function which will be called\nonce for each active point. The labels function will be called with the arguments point,\nindex, and points, where point refers to a single active point, index refers to the position\nof that point in the array of active points, and points is an array of all active points."
2808
+ },
2809
+ {
2810
+ "name": "mouseFollowTooltips",
2811
+ "type": "boolean",
2812
+ "description": "When the mouseFollowTooltip prop is set on ChartVoronoiContainer, The position of the center of the tooltip\nfollows the position of the mouse."
2813
+ },
2814
+ {
2815
+ "name": "name",
2816
+ "type": "string",
2817
+ "description": "The name prop is used to reference a component instance when defining shared events."
2818
+ },
2819
+ {
2820
+ "name": "onActivated",
2821
+ "type": "Function",
2822
+ "description": "The onActivated prop accepts a function to be called whenever new data points are activated.\nThe function is called with the parameters points (an array of active data objects) and props\n(the props used by ChartVoronoiContainer)."
2823
+ },
2824
+ {
2825
+ "name": "onDeactivated",
2826
+ "type": "Function",
2827
+ "description": "The onDeactivated prop accepts a function to be called whenever points are deactivated. The\nfunction is called with the parameters points (an array of the newly-deactivated data objects)\nand props (the props used by ChartVoronoiContainer)."
2828
+ },
2829
+ {
2830
+ "name": "origin",
2831
+ "type": "{ x: number, y: number }",
2832
+ "description": "Victory components will pass an origin prop is to define the center point in svg coordinates for polar charts.\n\nNote: It will not typically be necessary to set an origin prop manually"
2833
+ },
2834
+ {
2835
+ "name": "portalComponent",
2836
+ "type": "React.ReactElement<any>",
2837
+ "description": "The portalComponent prop takes a component instance which will be used as a container for children that should\nrender inside a top-level container so that they will always appear above other elements. ChartTooltip renders\ninside a portal so that tooltips always render above data. VictoryPortal is used to define elements that should\nrender in the portal container. This prop defaults to Portal, and should only be overridden when changing rendered\nelements from SVG to another type of element e.g., react-native-svg elements."
2838
+ },
2839
+ {
2840
+ "name": "portalZIndex",
2841
+ "type": "number",
2842
+ "description": "The portalZIndex prop determines the z-index of the div enclosing the portal component. If a portalZIndex prop is\nnot set, the z-index of the enclosing div will be set to 99."
2843
+ },
2844
+ {
2845
+ "name": "radius",
2846
+ "type": "number",
2847
+ "description": "When the radius prop is set, the voronoi areas associated with each data point will be no larger\nthan the given radius. This prop should be given as a number."
2848
+ },
2849
+ {
2850
+ "name": "responsive",
2851
+ "type": "boolean",
2852
+ "description": "The responsive prop specifies whether the rendered container should be a responsive container\nwith a viewBox attribute, or a static container with absolute width and height.\n\n@default true"
2853
+ },
2854
+ {
2855
+ "name": "style",
2856
+ "type": "React.CSSProperties",
2857
+ "description": "The style prop specifies styles for your ChartContainer. Any valid inline style properties\nwill be applied. Height and width should be specified via the height\nand width props, as they are used to calculate the alignment of\ncomponents within the container. Styles from the child component will\nalso be passed, if any exist.\n\n@example {border: 1px solid red}"
2858
+ },
2859
+ {
2860
+ "name": "tabIndex",
2861
+ "type": "number",
2862
+ "description": "The tabIndex prop specifies the description of the chart/SVG to assist with accessibility."
2863
+ },
2864
+ {
2865
+ "name": "theme",
2866
+ "type": "object",
2867
+ "description": "The theme prop specifies a theme to use for determining styles and layout properties for a component. Any styles or\nprops defined in theme may be overwritten by props specified on the component instance.",
2868
+ "defaultValue": "getTheme(themeColor)"
2869
+ },
2870
+ {
2871
+ "name": "themeColor",
2872
+ "type": "string",
2873
+ "description": "Specifies the theme color. Valid values are 'blue', 'green', 'multi', etc.\n\nNote: Not compatible with theme prop\n\n@example themeColor={ChartThemeColor.blue}"
2874
+ },
2875
+ {
2876
+ "name": "voronoiBlacklist",
2877
+ "type": "string[]",
2878
+ "description": "The voronoiBlacklist prop is used to specify a list of components to ignore when calculating a\nshared voronoi diagram. Components with a name prop matching an element in the voronoiBlacklist\narray will be ignored by ChartVoronoiContainer. Ignored components will never be flagged as\nactive, and will not contribute date to shared tooltips or labels."
2879
+ },
2880
+ {
2881
+ "name": "voronoiDimension",
2882
+ "type": "'x' | 'y'",
2883
+ "description": "When the voronoiDimension prop is set, voronoi selection will only take the given dimension into\naccount. For example, when dimension is set to “x”, all data points matching a particular x mouse\nposition will be activated regardless of y value. When this prop is not given, voronoi selection\nis determined by both x any y values."
2884
+ },
2885
+ {
2886
+ "name": "voronoiPadding",
2887
+ "type": "number",
2888
+ "description": "When the voronoiPadding prop is given, the area of the chart that will trigger voronoi events is\nreduced by the given padding on every side. By default, no padding is applied, and the entire range\nof a given chart may trigger voronoi events. This prop should be given as a number."
2889
+ },
2890
+ {
2891
+ "name": "width",
2892
+ "type": "number",
2893
+ "description": "The width props specifies the width of the svg viewBox of the container\nThis value should be given as a number of pixels. If no width prop\nis given, the width prop from the child component passed will be used."
2894
+ }
2895
+ ]
2896
+ }
2897
+ ],
2898
+ "examples": [
2899
+ "Basic with right aligned legend",
2900
+ "Bottom aligned legend",
2901
+ "Responsive bottom-left aligned legend",
2902
+ "Standalone legend",
2903
+ "Interactive legend",
2904
+ "Interactive legend with pie chart",
2905
+ "Legend tooltips",
2906
+ "Legend links",
2907
+ "Legend layout"
2908
+ ]
2909
+ };
2910
+ pageData.liveContext = {
2911
+ cloneElement,
2912
+ useEffect,
2913
+ useRef,
2914
+ useState,
2915
+ Chart,
2916
+ ChartArea,
2917
+ ChartAxis,
2918
+ ChartBar,
2919
+ ChartBullet,
2920
+ ChartContainer,
2921
+ ChartDonut,
2922
+ ChartGroup,
2923
+ ChartLabel,
2924
+ ChartLegend,
2925
+ ChartLegendTooltip,
2926
+ ChartLine,
2927
+ ChartPie,
2928
+ ChartScatter,
2929
+ ChartThemeColor,
2930
+ ChartVoronoiContainer,
2931
+ createContainer,
2932
+ getInteractiveLegendEvents,
2933
+ getInteractiveLegendItemStyles,
2934
+ getResizeObserver,
2935
+ chart_color_black_500
2936
+ };
2937
+ pageData.examples = {
2938
+ 'Basic with right aligned legend': props =>
2939
+ <Example {...pageData} {...props} {...{"code":"import { ChartDonut } from '@patternfly/react-charts/victory';\n\ninterface PetData {\n x?: string;\n y?: number;\n name?: string;\n}\n\nexport const ChartLegendBasicRightLegend: React.FunctionComponent = () => {\n const data: PetData[] = [\n { x: 'Cats', y: 35 },\n { x: 'Dogs', y: 55 },\n { x: 'Birds', y: 10 }\n ];\n const legendData: PetData[] = [{ name: 'Cats: 35' }, { name: 'Dogs: 55' }, { name: 'Birds: 10' }];\n\n return (\n <div style={{ height: '230px', width: '350px' }}>\n <ChartDonut\n ariaDesc=\"Average number of pets\"\n ariaTitle=\"Donut chart example\"\n constrainToVisibleArea\n data={data}\n labels={({ datum }) => `${datum.x}: ${datum.y}%`}\n legendData={legendData}\n legendOrientation=\"vertical\"\n legendPosition=\"right\"\n name=\"chart1\"\n padding={{\n bottom: 20,\n left: 20,\n right: 140, // Adjusted to accommodate legend\n top: 20\n }}\n subTitle=\"Pets\"\n title=\"100\"\n width={350}\n />\n </div>\n );\n};\n","title":"Basic with right aligned legend","lang":"ts","className":""}}>
2940
+
2941
+ </Example>,
2942
+ 'Bottom aligned legend': props =>
2943
+ <Example {...pageData} {...props} {...{"code":"import {\n Chart,\n ChartAxis,\n ChartBar,\n ChartGroup,\n ChartThemeColor,\n ChartVoronoiContainer\n} from '@patternfly/react-charts/victory';\n\ninterface PetData {\n x?: string;\n y?: number;\n name?: string;\n}\n\nexport const ChartLegendBottomAlignedLegend: React.FunctionComponent = () => {\n const legendData: PetData[] = [{ name: 'Cats' }, { name: 'Dogs' }, { name: 'Birds' }, { name: 'Mice' }];\n const data1: PetData[] = [\n { name: 'Cats', x: '2015', y: 1 },\n { name: 'Cats', x: '2016', y: 2 },\n { name: 'Cats', x: '2017', y: 5 },\n { name: 'Cats', x: '2018', y: 3 }\n ];\n const data2: PetData[] = [\n { name: 'Dogs', x: '2015', y: 2 },\n { name: 'Dogs', x: '2016', y: 1 },\n { name: 'Dogs', x: '2017', y: 7 },\n { name: 'Dogs', x: '2018', y: 4 }\n ];\n const data3: PetData[] = [\n { name: 'Birds', x: '2015', y: 4 },\n { name: 'Birds', x: '2016', y: 4 },\n { name: 'Birds', x: '2017', y: 9 },\n { name: 'Birds', x: '2018', y: 7 }\n ];\n const data4: PetData[] = [\n { name: 'Mice', x: '2015', y: 3 },\n { name: 'Mice', x: '2016', y: 3 },\n { name: 'Mice', x: '2017', y: 8 },\n { name: 'Mice', x: '2018', y: 5 }\n ];\n\n return (\n <div style={{ height: '275px', width: '450px' }}>\n <Chart\n ariaDesc=\"Average number of pets\"\n ariaTitle=\"Bar chart example\"\n containerComponent={\n <ChartVoronoiContainer labels={({ datum }) => `${datum.name}: ${datum.y}`} constrainToVisibleArea />\n }\n domainPadding={{ x: [30, 25] }}\n legendData={legendData}\n legendPosition=\"bottom\"\n height={275}\n name=\"chart2\"\n padding={{\n bottom: 75, // Adjusted to accommodate legend\n left: 50,\n right: 50,\n top: 50\n }}\n themeColor={ChartThemeColor.purple}\n width={450}\n >\n <ChartAxis />\n <ChartAxis dependentAxis showGrid />\n <ChartGroup offset={11}>\n <ChartBar data={data1} />\n <ChartBar data={data2} />\n <ChartBar data={data3} />\n <ChartBar data={data4} />\n </ChartGroup>\n </Chart>\n </div>\n );\n};\n","title":"Bottom aligned legend","lang":"ts","className":""}}>
2944
+
2945
+ </Example>,
2946
+ 'Responsive bottom-left aligned legend': props =>
2947
+ <Example {...pageData} {...props} {...{"code":"import { ChartBullet } from '@patternfly/react-charts/victory';\nimport { getResizeObserver } from '@patternfly/react-core';\nimport { useRef, useState, useEffect } from 'react';\n\ninterface Data {\n name?: string;\n y?: number;\n}\n\nexport const ChartLegendResponsiveBottomLeft: React.FunctionComponent = () => {\n const containerRef = useRef<HTMLDivElement>(null);\n const [extraHeight, setExtraHeight] = useState(0);\n const [width, setWidth] = useState(0);\n\n const handleResize = () => {\n if (containerRef.current && containerRef.current.clientWidth) {\n setWidth(containerRef.current.clientWidth);\n }\n };\n\n const handleLegendAllowWrap = (newExtraHeight: number) => {\n if (newExtraHeight !== extraHeight) {\n setExtraHeight(newExtraHeight);\n }\n };\n\n const getHeight = (baseHeight: number) => baseHeight + extraHeight;\n\n useEffect(() => {\n const observer = getResizeObserver(containerRef.current, handleResize);\n handleResize();\n\n return () => {\n observer();\n };\n }, []);\n\n const comparativeWarningMeasureData: Data[] = [{ name: 'Warning', y: 88 }];\n const comparativeWarningMeasureLegendData: Data[] = [{ name: 'Warning' }];\n const primarySegmentedMeasureData: Data[] = [\n { name: 'Measure', y: 25 },\n { name: 'Measure', y: 60 }\n ];\n const primarySegmentedMeasureLegendData: Data[] = [{ name: 'Measure 1' }, { name: 'Measure 2' }];\n const qualitativeRangeData: Data[] = [\n { name: 'Range', y: 50 },\n { name: 'Range', y: 75 }\n ];\n const qualitativeRangeLegendData: Data[] = [{ name: 'Range 1' }, { name: 'Range 2' }];\n const height = getHeight(200);\n\n return (\n <div ref={containerRef} style={{ height: height + 'px' }}>\n <ChartBullet\n ariaDesc=\"Storage capacity\"\n ariaTitle=\"Bullet chart example\"\n comparativeWarningMeasureData={comparativeWarningMeasureData}\n comparativeWarningMeasureLegendData={comparativeWarningMeasureLegendData}\n constrainToVisibleArea\n height={height}\n labels={({ datum }) => `${datum.name}: ${datum.y}`}\n legendAllowWrap={handleLegendAllowWrap}\n legendPosition=\"bottom-left\"\n maxDomain={{ y: 100 }}\n name=\"chart3\"\n padding={{\n bottom: 50,\n left: 50,\n right: 50,\n top: 100 // Adjusted to accommodate labels\n }}\n primarySegmentedMeasureData={primarySegmentedMeasureData}\n primarySegmentedMeasureLegendData={primarySegmentedMeasureLegendData}\n qualitativeRangeData={qualitativeRangeData}\n qualitativeRangeLegendData={qualitativeRangeLegendData}\n subTitle=\"Measure details\"\n title=\"Text label\"\n titlePosition=\"top-left\"\n width={width}\n />\n </div>\n );\n};\n","title":"Responsive bottom-left aligned legend","lang":"ts","className":""}}>
2948
+
2949
+ <p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
2950
+ {`This demonstrates a responsive legend which wraps when items are wider than its container.`}
2951
+ </p>
2952
+ </Example>,
2953
+ 'Standalone legend': props =>
2954
+ <Example {...pageData} {...props} {...{"code":"import {\n Chart,\n ChartAxis,\n ChartGroup,\n ChartLegend,\n ChartLine,\n ChartThemeColor,\n ChartVoronoiContainer\n} from '@patternfly/react-charts/victory';\n\ninterface PetData {\n name?: string;\n x?: string;\n y?: number;\n symbol?: { type: string };\n}\n\nexport const ChartLegendStandalone: React.FunctionComponent = () => {\n const data1: PetData[] = [\n { name: 'Cats', x: '2015', y: 1 },\n { name: 'Cats', x: '2016', y: 2 },\n { name: 'Cats', x: '2017', y: 5 },\n { name: 'Cats', x: '2018', y: 3 }\n ];\n const data2: PetData[] = [\n { name: 'Dogs', x: '2015', y: 2 },\n { name: 'Dogs', x: '2016', y: 1 },\n { name: 'Dogs', x: '2017', y: 7 },\n { name: 'Dogs', x: '2018', y: 4 }\n ];\n const data3: PetData[] = [\n { name: 'Birds', x: '2015', y: 3 },\n { name: 'Birds', x: '2016', y: 4 },\n { name: 'Birds', x: '2017', y: 9 },\n { name: 'Birds', x: '2018', y: 5 }\n ];\n const data4: PetData[] = [\n { name: 'Mice', x: '2015', y: 3 },\n { name: 'Mice', x: '2016', y: 3 },\n { name: 'Mice', x: '2017', y: 8 },\n { name: 'Mice', x: '2018', y: 7 }\n ];\n const data5: PetData[] = [\n { name: 'Cats' },\n { name: 'Dogs', symbol: { type: 'dash' } },\n { name: 'Birds' },\n { name: 'Mice' }\n ];\n\n return (\n <div style={{ height: '275px', width: '450px' }}>\n <Chart\n ariaDesc=\"Average number of pets\"\n ariaTitle=\"Line chart example\"\n containerComponent={\n <ChartVoronoiContainer labels={({ datum }) => `${datum.name}: ${datum.y}`} constrainToVisibleArea />\n }\n height={275}\n maxDomain={{ y: 10 }}\n minDomain={{ y: 0 }}\n name=\"chart4\"\n padding={{\n bottom: 75, // Adjusted to accommodate legend\n left: 50,\n right: 50,\n top: 50\n }}\n themeColor={ChartThemeColor.green}\n width={450}\n >\n <ChartAxis tickValues={[2, 3, 4]} />\n <ChartAxis dependentAxis showGrid tickValues={[2, 5, 8]} />\n <ChartGroup>\n <ChartLine data={data1} />\n <ChartLine\n data={data2}\n style={{\n data: {\n strokeDasharray: '3,3'\n }\n }}\n />\n <ChartLine data={data3} />\n <ChartLine data={data4} />\n </ChartGroup>\n <ChartLegend data={data5} x={80} y={235} />\n </Chart>\n </div>\n );\n};\n","title":"Standalone legend","lang":"ts","className":""}}>
2955
+
2956
+ <p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
2957
+ {`This demonstrates a standalone legend vs. using the `}
2958
+
2959
+ <code {...{"className":"ws-code "}}>
2960
+ {`legendData`}
2961
+ </code>
2962
+ {` property.`}
2963
+ </p>
2964
+ </Example>,
2965
+ 'Interactive legend': props =>
2966
+ <Example {...pageData} {...props} {...{"code":"import {\n Chart,\n ChartArea,\n ChartAxis,\n ChartGroup,\n ChartLegend,\n ChartLegendTooltip,\n ChartScatter,\n ChartThemeColor,\n createContainer,\n getInteractiveLegendEvents,\n getInteractiveLegendItemStyles\n} from '@patternfly/react-charts/victory';\nimport { getResizeObserver } from '@patternfly/react-core';\nimport { useRef, useState, useEffect } from 'react';\n\nexport const ChartLegendInteractive: React.FunctionComponent = () => {\n const containerRef = useRef(null);\n const [hiddenSeries, setHiddenSeries] = useState(new Set());\n const [width, setWidth] = useState(0);\n\n const series = [\n {\n datapoints: [\n { x: '2015', y: 3 },\n { x: '2016', y: 4 },\n { x: '2017', y: 8 },\n { x: '2018', y: 6 }\n ],\n legendItem: { name: 'Cats' }\n },\n {\n datapoints: [\n { x: '2015', y: 2 },\n { x: '2016', y: 3 },\n { x: '2017', y: 4 },\n { x: '2018', y: 5 },\n { x: '2019', y: 6 }\n ],\n legendItem: { name: 'Dogs' }\n },\n {\n datapoints: [\n { x: '2015', y: 1 },\n { x: '2016', y: 2 },\n { x: '2017', y: 3 },\n { x: '2018', y: 2 },\n { x: '2019', y: 4 }\n ],\n legendItem: { name: 'Birds' }\n }\n ];\n\n // Returns groups of chart names associated with each data series\n const getChartNames = () => series.map((_, index) => [`area-${index}`, `scatter-${index}`]);\n\n // Handles legend click to toggle visibility of data series\n const handleLegendClick = (props) => {\n setHiddenSeries((prev) => {\n const newHidden = new Set(prev);\n if (!newHidden.delete(props.index)) {\n newHidden.add(props.index);\n }\n return newHidden;\n });\n };\n\n // Returns legend data styled per hiddenSeries\n const getLegendData = () =>\n series.map((s, index) => ({\n childName: `area-${index}`,\n ...s.legendItem,\n ...getInteractiveLegendItemStyles(hiddenSeries.has(index))\n }));\n\n // Returns true if data series is hidden\n const isHidden = (index) => hiddenSeries.has(index);\n\n // Checks if any data series is visible\n const isDataAvailable = () => hiddenSeries.size !== series.length;\n\n // Set chart width per current window size\n useEffect(() => {\n const observer = getResizeObserver(containerRef.current, () => {\n if (containerRef.current?.clientWidth) {\n setWidth(containerRef.current.clientWidth);\n }\n });\n return () => observer();\n }, []);\n\n // Note: Container order is important\n const CursorVoronoiContainer = createContainer('voronoi', 'cursor');\n const container = (\n <CursorVoronoiContainer\n cursorDimension=\"x\"\n labels={({ datum }) => (datum.childName.includes('area-') && datum.y !== null ? `${datum.y}` : null)}\n labelComponent={<ChartLegendTooltip legendData={getLegendData()} title={(datum) => datum.x} />}\n mouseFollowTooltips\n voronoiDimension=\"x\"\n voronoiPadding={50}\n disable={!isDataAvailable()}\n />\n );\n\n return (\n <div ref={containerRef}>\n <div className=\"area-chart-legend-bottom-responsive\">\n <Chart\n ariaDesc=\"Average number of pets\"\n ariaTitle=\"Area chart example\"\n containerComponent={container}\n events={getInteractiveLegendEvents({\n chartNames: getChartNames(),\n isHidden,\n legendName: 'chart5-ChartLegend',\n onLegendClick: handleLegendClick\n })}\n height={225}\n legendComponent={<ChartLegend name={'chart5-ChartLegend'} data={getLegendData()} />}\n legendPosition=\"bottom-left\"\n name=\"chart5\"\n padding={{ bottom: 75, left: 50, right: 50, top: 50 }}\n maxDomain={{ y: 9 }}\n themeColor={ChartThemeColor.multiUnordered}\n width={width}\n >\n <ChartAxis tickValues={['2015', '2016', '2017', '2018']} />\n <ChartAxis dependentAxis showGrid />\n <ChartGroup>\n {series.map((s, index) => (\n <ChartScatter\n key={`scatter-${index}`}\n name={`scatter-${index}`}\n data={!isHidden(index) ? s.datapoints : [{ y: null }]}\n size={({ active }) => (active ? 5 : 3)}\n />\n ))}\n </ChartGroup>\n <ChartGroup>\n {series.map((s, index) => (\n <ChartArea\n key={`area-${index}`}\n name={`area-${index}`}\n data={!isHidden(index) ? s.datapoints : [{ y: null }]}\n interpolation=\"monotoneX\"\n />\n ))}\n </ChartGroup>\n </Chart>\n </div>\n </div>\n );\n};\n","title":"Interactive legend","lang":"ts","className":""}}>
2967
+
2968
+ <p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
2969
+ {`This demonstrates how to add an interactive legend using events such as `}
2970
+
2971
+ <code {...{"className":"ws-code "}}>
2972
+ {`onMouseOver`}
2973
+ </code>
2974
+ {`, `}
2975
+
2976
+ <code {...{"className":"ws-code "}}>
2977
+ {`onMouseOut`}
2978
+ </code>
2979
+ {`, and `}
2980
+
2981
+ <code {...{"className":"ws-code "}}>
2982
+ {`onClick`}
2983
+ </code>
2984
+ {`.`}
2985
+ </p>
2986
+ </Example>,
2987
+ 'Interactive legend with pie chart': props =>
2988
+ <Example {...pageData} {...props} {...{"code":"import {\n Chart,\n ChartLegend,\n ChartThemeColor,\n ChartPie,\n getInteractiveLegendEvents,\n getInteractiveLegendItemStyles\n} from '@patternfly/react-charts/victory';\nimport { useState } from 'react';\n\nexport const ChartLegendInteractivePieChart: React.FunctionComponent = () => {\n const [hiddenSeries, setHiddenSeries] = useState<Set<number>>(new Set());\n\n const series = [\n {\n datapoints: { x: 'Cats', y: 35 },\n legendItem: { name: 'Cats: 35' }\n },\n {\n datapoints: { x: 'Dogs', y: 55 },\n legendItem: { name: 'Dogs: 55' }\n },\n {\n datapoints: { x: 'Birds', y: 10 },\n legendItem: { name: 'Birds: 10' }\n }\n ];\n\n // Returns groups of chart names associated with each data series\n const getChartNames = () => {\n const result = [];\n series.map((_, _index) => {\n // Provide names for each series hidden / shown -- use the same name for a pie chart\n result.push(['pie']);\n });\n return result;\n };\n\n // Returns legend data styled per hiddenSeries\n const getLegendData = () =>\n series.map((s, index) => ({\n ...s.legendItem, // name property\n ...getInteractiveLegendItemStyles(hiddenSeries.has(index)) // hidden styles\n }));\n\n // Hide each data series individually\n const handleLegendClick = (props: { index: number }) => {\n const newHiddenSeries = new Set(hiddenSeries);\n if (newHiddenSeries.delete(props.index)) {\n newHiddenSeries.add(props.index);\n }\n setHiddenSeries(newHiddenSeries);\n };\n\n // Returns true if data series is hidden\n const isHidden = (index: number) => hiddenSeries.has(index);\n // Returns onMouseOver, onMouseOut, and onClick events for the interactive legend\n const getEvents = () =>\n getInteractiveLegendEvents({\n chartNames: getChartNames(),\n isHidden,\n legendName: 'chart6-ChartLegend',\n onLegendClick: handleLegendClick\n });\n\n const data = [];\n series.map((s, index) => {\n data.push(!hiddenSeries.has(index) ? s.datapoints : { y: null });\n });\n\n return (\n <div style={{ height: '275px', width: '300px' }}>\n <Chart\n ariaDesc=\"Average number of pets\"\n ariaTitle=\"Pie chart example\"\n events={getEvents()}\n height={275}\n legendComponent={<ChartLegend name={'chart6-ChartLegend'} data={getLegendData()} />}\n legendPosition=\"bottom\"\n name=\"chart6\"\n padding={{\n bottom: 65,\n left: 20,\n right: 20,\n top: 20\n }}\n showAxis={false}\n themeColor={ChartThemeColor.multiUnordered}\n width={300}\n >\n <ChartPie constrainToVisibleArea data={data} labels={({ datum }) => `${datum.x}: ${datum.y}`} name=\"pie\" />\n </Chart>\n </div>\n );\n};\n","title":"Interactive legend with pie chart","lang":"ts","className":""}}>
2989
+
2990
+ <p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
2991
+ {`This demonstrates how to add an interactive legend to a pie chart using events such as `}
2992
+
2993
+ <code {...{"className":"ws-code "}}>
2994
+ {`onMouseOver`}
2995
+ </code>
2996
+ {`, `}
2997
+
2998
+ <code {...{"className":"ws-code "}}>
2999
+ {`onMouseOut`}
3000
+ </code>
3001
+ {`, and `}
3002
+
3003
+ <code {...{"className":"ws-code "}}>
3004
+ {`onClick`}
3005
+ </code>
3006
+ {`.`}
3007
+ </p>
3008
+ </Example>,
3009
+ 'Legend tooltips': props =>
3010
+ <Example {...pageData} {...props} {...{"code":"import { ChartLabel, ChartLegend, ChartPie, ChartThemeColor } from '@patternfly/react-charts/victory';\nimport { Tooltip } from '@patternfly/react-core';\nimport { useRef } from 'react';\n\ninterface PetData {\n x: string;\n y: number;\n}\n\nexport const ChartLegendTooltips: React.FunctionComponent = () => {\n const data: PetData[] = [\n { x: 'Cats', y: 35 },\n { x: 'Dogs', y: 55 },\n { x: 'Birds', y: 10 }\n ];\n\n // Custom legend label component\n // Note: Tooltip wraps children with a div tag, so we use a reference to ChartLabel instead\n const LegendLabel = ({ datum, ...rest }) => {\n const ref = useRef(null);\n return (\n <g ref={ref}>\n <ChartLabel {...rest} />\n <Tooltip content={datum.name} enableFlip triggerRef={ref} />\n </g>\n );\n };\n\n // Custom legend component\n const getLegend = (legendData) => <ChartLegend data={legendData} labelComponent={<LegendLabel />} />;\n\n return (\n <div style={{ height: '275px', width: '300px' }}>\n <ChartPie\n ariaDesc=\"Average number of pets\"\n ariaTitle=\"Pie chart example\"\n constrainToVisibleArea\n data={data}\n height={275}\n labels={({ datum }) => `${datum.x}: ${datum.y}`}\n legendComponent={getLegend([{ name: 'Cats: 35' }, { name: 'Dogs: 55' }, { name: 'Birds: 10' }])}\n legendPosition=\"bottom\"\n name=\"chart7\"\n padding={{\n bottom: 65,\n left: 20,\n right: 20,\n top: 20\n }}\n themeColor={ChartThemeColor.multiOrdered}\n width={300}\n />\n </div>\n );\n};\n","title":"Legend tooltips","lang":"ts","className":""}}>
3011
+
3012
+ <p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
3013
+ {`This demonstrates an approach for applying tooltips to a legend using a custom label component. These tooltips are keyboard navigable.`}
3014
+ </p>
3015
+ </Example>,
3016
+ 'Legend links': props =>
3017
+ <Example {...pageData} {...props} {...{"code":"import {\n Chart,\n ChartAxis,\n ChartGroup,\n ChartLabel,\n ChartLegend,\n ChartLine,\n ChartVoronoiContainer\n} from '@patternfly/react-charts/victory';\n\ninterface PetData {\n name?: string;\n x?: string;\n y?: number;\n symbol?: { type: string };\n}\n\nexport const ChartLegendLinks: React.FunctionComponent = () => {\n // Custom legend label component\n const LegendLabel = ({ _datum, ...rest }) => (\n <a href=\"#\" aria-label={`Learn more about ${rest.text}`}>\n <ChartLabel {...rest} />\n </a>\n );\n\n // Custom legend component\n const getLegend = (legendData) => <ChartLegend data={legendData} labelComponent={<LegendLabel />} />;\n\n const legendData: PetData[] = [\n { name: 'Cats' },\n { name: 'Dogs', symbol: { type: 'dash' } },\n { name: 'Birds' },\n { name: 'Mice' }\n ];\n const data1: PetData[] = [\n { name: 'Cats', x: '2015', y: 1 },\n { name: 'Cats', x: '2016', y: 2 },\n { name: 'Cats', x: '2017', y: 5 },\n { name: 'Cats', x: '2018', y: 3 }\n ];\n const data2: PetData[] = [\n { name: 'Dogs', x: '2015', y: 2 },\n { name: 'Dogs', x: '2016', y: 1 },\n { name: 'Dogs', x: '2017', y: 7 },\n { name: 'Dogs', x: '2018', y: 4 }\n ];\n const data3: PetData[] = [\n { name: 'Birds', x: '2015', y: 3 },\n { name: 'Birds', x: '2016', y: 4 },\n { name: 'Birds', x: '2017', y: 9 },\n { name: 'Birds', x: '2018', y: 5 }\n ];\n const data4: PetData[] = [\n { name: 'Mice', x: '2015', y: 3 },\n { name: 'Mice', x: '2016', y: 3 },\n { name: 'Mice', x: '2017', y: 8 },\n { name: 'Mice', x: '2018', y: 7 }\n ];\n\n return (\n <div\n role=\"article\"\n aria-describedby=\"withLinks-desc\"\n aria-labelledby=\"withLinks-title\"\n style={{ height: '275px', width: '450px' }}\n >\n <Chart\n ariaDesc=\"Average number of pets per year\"\n ariaTitle=\"Line chart example\"\n containerComponent={\n <ChartVoronoiContainer\n containerId=\"withLinks\"\n role=\"figure\"\n labels={({ datum }) => `${datum.name}: ${datum.y}`}\n constrainToVisibleArea\n />\n }\n legendComponent={getLegend([{ name: 'Cats' }, { name: 'Dogs' }, { name: 'Birds' }, { name: 'Mice' }])}\n legendData={legendData}\n legendPosition=\"bottom\"\n height={275}\n maxDomain={{ y: 10 }}\n minDomain={{ y: 0 }}\n name=\"chart8\"\n padding={{\n bottom: 75, // Adjusted to accommodate legend\n left: 50,\n right: 50,\n top: 50\n }}\n width={450}\n >\n <ChartAxis tickValues={[2, 3, 4]} tickLabelComponent={<ChartLabel ariaLabel=\"X axis - the year polled\" />} />\n <ChartAxis\n dependentAxis\n showGrid\n tickValues={[2, 5, 8]}\n tickLabelComponent={<ChartLabel ariaLabel=\"Y axis - average number of pets\" />}\n />\n <ChartGroup>\n <ChartLine data={data1} />\n <ChartLine\n data={data2}\n style={{\n data: {\n strokeDasharray: '3,3'\n }\n }}\n />\n <ChartLine data={data3} />\n <ChartLine data={data4} />\n </ChartGroup>\n </Chart>\n </div>\n );\n};\n","title":"Legend links","lang":"ts","className":""}}>
3018
+
3019
+ <p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
3020
+ {`This demonstrates an approach for applying links to a legend using a custom label component. These links are keyboard navigable.`}
3021
+ </p>
3022
+ </Example>,
3023
+ 'Legend layout': props =>
3024
+ <Example {...pageData} {...props} {...{"code":"import { ChartLabel, ChartLegend, ChartDonut, ChartThemeColor } from '@patternfly/react-charts/victory';\n\ninterface PetData {\n x: string;\n y: number;\n}\n\nexport const ChartLegendLayout: React.FunctionComponent = () => {\n // Custom legend label component\n const LegendLabel = ({ values, ...rest }) => (\n <ChartLabel {...rest} style={[{ fontWeight: 700 }, {}]} text={[values[rest.index], rest.text]} />\n );\n\n // Custom legend component\n const getLegend = (legendData, values) => (\n <ChartLegend\n data={legendData}\n gutter={25}\n itemsPerRow={2}\n labelComponent={<LegendLabel dy={10} lineHeight={1.5} values={values} />}\n rowGutter={20}\n />\n );\n\n const data: PetData[] = [\n { x: 'Cats', y: 35 },\n { x: 'Dogs', y: 55 },\n { x: 'Birds', y: 10 }\n ];\n\n return (\n <div style={{ height: '230px', width: '375px' }}>\n <ChartDonut\n ariaDesc=\"Average number of pets\"\n ariaTitle=\"Pie chart example\"\n constrainToVisibleArea\n data={data}\n height={230}\n labels={({ datum }) => `${datum.x}: ${datum.y}`}\n legendComponent={getLegend([{ name: 'Cats' }, { name: 'Dogs' }, { name: 'Birds' }], [35, 55, 10])}\n legendOrientation=\"vertical\"\n legendPosition=\"right\"\n name=\"chart9\"\n padding={{\n bottom: 20,\n left: 20,\n right: 140, // Adjusted to accommodate legend\n top: 20\n }}\n subTitle=\"Pets\"\n title=\"100\"\n themeColor={ChartThemeColor.multiOrdered}\n width={375}\n />\n </div>\n );\n};\n","title":"Legend layout","lang":"ts","className":""}}>
3025
+
3026
+ <p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
3027
+ {`This demonstrates an approach for applying a different legend layout and styles using a custom label component.`}
3028
+ </p>
3029
+ </Example>
3030
+ };
3031
+
3032
+ const Component = () => (
3033
+ <React.Fragment>
3034
+ <AutoLinkHeader {...{"id":"introduction","headingLevel":"h2","className":"ws-title ws-h2"}}>
3035
+ {`Introduction`}
3036
+ </AutoLinkHeader>
3037
+ <p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
3038
+ {`Note: PatternFly React charts live in its own package at `}
3039
+ <PatternflyThemeLink {...{"to":"https://www.npmjs.com/package/@patternfly/react-charts","className":""}}>
3040
+ {`@patternfly/react-charts`}
3041
+ </PatternflyThemeLink>
3042
+ {`!`}
3043
+ </p>
3044
+ <p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
3045
+ {`The examples below are based on the `}
3046
+ <PatternflyThemeLink {...{"to":"https://formidable.com/open-source/victory/docs/victory-chart/","className":""}}>
3047
+ {`Victory`}
3048
+ </PatternflyThemeLink>
3049
+ {` chart library, along with additional functionality, custom components, and theming for PatternFly. This provides a collection of React based components you can use to build PatternFly patterns with consistent markup, styling, and behavior.`}
3050
+ </p>
3051
+ <AutoLinkHeader {...{"id":"examples","headingLevel":"h2","className":"ws-title ws-h2"}}>
3052
+ {`Examples`}
3053
+ </AutoLinkHeader>
3054
+ {React.createElement(pageData.examples["Basic with right aligned legend"])}
3055
+ {React.createElement(pageData.examples["Bottom aligned legend"])}
3056
+ {React.createElement(pageData.examples["Responsive bottom-left aligned legend"])}
3057
+ {React.createElement(pageData.examples["Standalone legend"])}
3058
+ {React.createElement(pageData.examples["Interactive legend"])}
3059
+ {React.createElement(pageData.examples["Interactive legend with pie chart"])}
3060
+ {React.createElement(pageData.examples["Legend tooltips"])}
3061
+ {React.createElement(pageData.examples["Legend links"])}
3062
+ {React.createElement(pageData.examples["Legend layout"])}
3063
+ <AutoLinkHeader {...{"id":"documentation","headingLevel":"h2","className":"ws-title ws-h2"}}>
3064
+ {`Documentation`}
3065
+ </AutoLinkHeader>
3066
+ <AutoLinkHeader {...{"id":"tips","headingLevel":"h3","className":"ws-title ws-h3"}}>
3067
+ {`Tips`}
3068
+ </AutoLinkHeader>
3069
+ <ul {...{"className":"pf-v6-c-content--ul pf-m-editorial ws-ul "}}>
3070
+ <li {...{"className":"pf-v6-c-content--li pf-m-editorial ws-li "}}>
3071
+ {`See Victory's `}
3072
+ <PatternflyThemeLink {...{"to":"https://formidable.com/open-source/victory/docs/faq","className":""}}>
3073
+ {`FAQ`}
3074
+ </PatternflyThemeLink>
3075
+ </li>
3076
+ <li {...{"className":"pf-v6-c-content--li pf-m-editorial ws-li "}}>
3077
+ <code {...{"className":"ws-code "}}>
3078
+ {`ChartLegend`}
3079
+ </code>
3080
+ {` may be used as a standalone component, instead of using `}
3081
+ <code {...{"className":"ws-code "}}>
3082
+ {`legendData`}
3083
+ </code>
3084
+ </li>
3085
+ </ul>
3086
+ <AutoLinkHeader {...{"id":"note","headingLevel":"h3","className":"ws-title ws-h3"}}>
3087
+ {`Note`}
3088
+ </AutoLinkHeader>
3089
+ <p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
3090
+ {`Currently, the generated documentation below is not able to resolve type definitions from Victory imports. For the
3091
+ components used in the examples above, Victory pass-thru props are also documented here:`}
3092
+ </p>
3093
+ <ul {...{"className":"pf-v6-c-content--ul pf-m-editorial ws-ul "}}>
3094
+ <li {...{"className":"pf-v6-c-content--li pf-m-editorial ws-li "}}>
3095
+ {`For `}
3096
+ <code {...{"className":"ws-code "}}>
3097
+ {`Chart`}
3098
+ </code>
3099
+ {` props, see `}
3100
+ <PatternflyThemeLink {...{"to":"https://formidable.com/open-source/victory/docs/victory-chart","className":""}}>
3101
+ {`VictoryChart`}
3102
+ </PatternflyThemeLink>
3103
+ </li>
3104
+ <li {...{"className":"pf-v6-c-content--li pf-m-editorial ws-li "}}>
3105
+ {`For `}
3106
+ <code {...{"className":"ws-code "}}>
3107
+ {`ChartArea`}
3108
+ </code>
3109
+ {` props, see `}
3110
+ <PatternflyThemeLink {...{"to":"https://formidable.com/open-source/victory/docs/victory-area","className":""}}>
3111
+ {`VictoryArea`}
3112
+ </PatternflyThemeLink>
3113
+ </li>
3114
+ <li {...{"className":"pf-v6-c-content--li pf-m-editorial ws-li "}}>
3115
+ {`For `}
3116
+ <code {...{"className":"ws-code "}}>
3117
+ {`ChartAxis`}
3118
+ </code>
3119
+ {` props, see `}
3120
+ <PatternflyThemeLink {...{"to":"https://formidable.com/open-source/victory/docs/victory-axis","className":""}}>
3121
+ {`VictoryAxis`}
3122
+ </PatternflyThemeLink>
3123
+ </li>
3124
+ <li {...{"className":"pf-v6-c-content--li pf-m-editorial ws-li "}}>
3125
+ {`For `}
3126
+ <code {...{"className":"ws-code "}}>
3127
+ {`ChartBar`}
3128
+ </code>
3129
+ {` props, see `}
3130
+ <PatternflyThemeLink {...{"to":"https://formidable.com/open-source/victory/docs/victory-bar","className":""}}>
3131
+ {`VictoryBar`}
3132
+ </PatternflyThemeLink>
3133
+ </li>
3134
+ <li {...{"className":"pf-v6-c-content--li pf-m-editorial ws-li "}}>
3135
+ {`For `}
3136
+ <code {...{"className":"ws-code "}}>
3137
+ {`ChartBullet`}
3138
+ </code>
3139
+ {` props, see `}
3140
+ <PatternflyThemeLink {...{"to":"https://formidable.com/open-source/victory/docs/victory-bar","className":""}}>
3141
+ {`VictoryBar`}
3142
+ </PatternflyThemeLink>
3143
+ </li>
3144
+ <li {...{"className":"pf-v6-c-content--li pf-m-editorial ws-li "}}>
3145
+ {`For `}
3146
+ <code {...{"className":"ws-code "}}>
3147
+ {`ChartDonut`}
3148
+ </code>
3149
+ {` props, see `}
3150
+ <PatternflyThemeLink {...{"to":"https://formidable.com/open-source/victory/docs/victory-pie","className":""}}>
3151
+ {`VictoryPie`}
3152
+ </PatternflyThemeLink>
3153
+ </li>
3154
+ <li {...{"className":"pf-v6-c-content--li pf-m-editorial ws-li "}}>
3155
+ {`For `}
3156
+ <code {...{"className":"ws-code "}}>
3157
+ {`ChartGroup`}
3158
+ </code>
3159
+ {` props, see `}
3160
+ <PatternflyThemeLink {...{"to":"https://formidable.com/open-source/victory/docs/victory-group","className":""}}>
3161
+ {`VictoryGroup`}
3162
+ </PatternflyThemeLink>
3163
+ </li>
3164
+ <li {...{"className":"pf-v6-c-content--li pf-m-editorial ws-li "}}>
3165
+ {`For `}
3166
+ <code {...{"className":"ws-code "}}>
3167
+ {`ChartLabel`}
3168
+ </code>
3169
+ {` props, see `}
3170
+ <PatternflyThemeLink {...{"to":"https://formidable.com/open-source/victory/docs/victory-label","className":""}}>
3171
+ {`VictoryLabel`}
3172
+ </PatternflyThemeLink>
3173
+ </li>
3174
+ <li {...{"className":"pf-v6-c-content--li pf-m-editorial ws-li "}}>
3175
+ {`For `}
3176
+ <code {...{"className":"ws-code "}}>
3177
+ {`ChartLegend`}
3178
+ </code>
3179
+ {` props, see `}
3180
+ <PatternflyThemeLink {...{"to":"https://formidable.com/open-source/victory/docs/victory-legend","className":""}}>
3181
+ {`VictoryLegend`}
3182
+ </PatternflyThemeLink>
3183
+ </li>
3184
+ <li {...{"className":"pf-v6-c-content--li pf-m-editorial ws-li "}}>
3185
+ {`For `}
3186
+ <code {...{"className":"ws-code "}}>
3187
+ {`ChartLine`}
3188
+ </code>
3189
+ {` props, see `}
3190
+ <PatternflyThemeLink {...{"to":"https://formidable.com/open-source/victory/docs/victory-line","className":""}}>
3191
+ {`VictoryLine`}
3192
+ </PatternflyThemeLink>
3193
+ </li>
3194
+ <li {...{"className":"pf-v6-c-content--li pf-m-editorial ws-li "}}>
3195
+ {`For `}
3196
+ <code {...{"className":"ws-code "}}>
3197
+ {`ChartPie`}
3198
+ </code>
3199
+ {` props, see `}
3200
+ <PatternflyThemeLink {...{"to":"https://formidable.com/open-source/victory/docs/victory-pie","className":""}}>
3201
+ {`VictoryPie`}
3202
+ </PatternflyThemeLink>
3203
+ </li>
3204
+ <li {...{"className":"pf-v6-c-content--li pf-m-editorial ws-li "}}>
3205
+ {`For `}
3206
+ <code {...{"className":"ws-code "}}>
3207
+ {`ChartScatter`}
3208
+ </code>
3209
+ {` props, see `}
3210
+ <PatternflyThemeLink {...{"to":"https://formidable.com/open-source/victory/docs/victory-scatter","className":""}}>
3211
+ {`VictoryScatter`}
3212
+ </PatternflyThemeLink>
3213
+ </li>
3214
+ <li {...{"className":"pf-v6-c-content--li pf-m-editorial ws-li "}}>
3215
+ {`For `}
3216
+ <code {...{"className":"ws-code "}}>
3217
+ {`ChartVoronoiContainer`}
3218
+ </code>
3219
+ {` props, see `}
3220
+ <PatternflyThemeLink {...{"to":"https://formidable.com/open-source/victory/docs/victory-voronoi-container","className":""}}>
3221
+ {`VictoryVoronoiContainer`}
3222
+ </PatternflyThemeLink>
3223
+ </li>
3224
+ </ul>
3225
+ </React.Fragment>
3226
+ );
3227
+ Component.displayName = 'ComponentsChartsLegends-VictoryDocs';
3228
+ Component.pageData = pageData;
3229
+
3230
+ export default Component;