@patternfly/react-docs 7.6.0-prerelease.8 → 7.6.0-prerelease.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/LICENSE +21 -0
- package/package.json +12 -11
- package/patternfly-docs/generated/components/about-modal/react.js +0 -149
- package/patternfly-docs/generated/components/accordion/react.js +0 -262
- package/patternfly-docs/generated/components/action-list/react.js +0 -144
- package/patternfly-docs/generated/components/alert/react-demos.js +0 -56
- package/patternfly-docs/generated/components/alert/react.js +0 -1433
- package/patternfly-docs/generated/components/avatar/react.js +0 -166
- package/patternfly-docs/generated/components/back-to-top/react-demos.js +0 -60
- package/patternfly-docs/generated/components/back-to-top/react.js +0 -77
- package/patternfly-docs/generated/components/backdrop/react.js +0 -64
- package/patternfly-docs/generated/components/background-image/react.js +0 -62
- package/patternfly-docs/generated/components/badge/react.js +0 -97
- package/patternfly-docs/generated/components/banner/react-demos.js +0 -57
- package/patternfly-docs/generated/components/banner/react.js +0 -148
- package/patternfly-docs/generated/components/brand/react.js +0 -142
- package/patternfly-docs/generated/components/breadcrumb/react.js +0 -206
- package/patternfly-docs/generated/components/button/react-demos.js +0 -57
- package/patternfly-docs/generated/components/button/react.js +0 -826
- package/patternfly-docs/generated/components/card/react-demos.js +0 -201
- package/patternfly-docs/generated/components/card/react.js +0 -1015
- package/patternfly-docs/generated/components/charts/area-chart/-Victory.js +0 -1350
- package/patternfly-docs/generated/components/charts/bar-chart/-Victory.js +0 -1334
- package/patternfly-docs/generated/components/charts/box-plot-chart/-Victory.js +0 -1282
- package/patternfly-docs/generated/components/charts/bullet-chart/-Victory.js +0 -848
- package/patternfly-docs/generated/components/charts/colors-for-charts/-Victory.js +0 -192
- package/patternfly-docs/generated/components/charts/donut-chart/-Victory.js +0 -426
- package/patternfly-docs/generated/components/charts/donut-utilization-chart/-Victory.js +0 -804
- package/patternfly-docs/generated/components/charts/legends/-Victory.js +0 -3230
- package/patternfly-docs/generated/components/charts/line-chart/-Victory.js +0 -1178
- package/patternfly-docs/generated/components/charts/line-chart/ECharts.js +0 -525
- package/patternfly-docs/generated/components/charts/patterns/-Victory.js +0 -3382
- package/patternfly-docs/generated/components/charts/pie-chart/-Victory.js +0 -377
- package/patternfly-docs/generated/components/charts/resize-observer/-Victory.js +0 -2475
- package/patternfly-docs/generated/components/charts/sankey-chart/ECharts.js +0 -538
- package/patternfly-docs/generated/components/charts/scatter-chart/-Victory.js +0 -1551
- package/patternfly-docs/generated/components/charts/skeletons/-Victory.js +0 -4115
- package/patternfly-docs/generated/components/charts/sparkline-chart/-Victory.js +0 -955
- package/patternfly-docs/generated/components/charts/stack-chart/-Victory.js +0 -1173
- package/patternfly-docs/generated/components/charts/threshold-chart/-Victory.js +0 -1166
- package/patternfly-docs/generated/components/charts/tooltips/-Victory.js +0 -413
- package/patternfly-docs/generated/components/chip/react-deprecated.js +0 -323
- package/patternfly-docs/generated/components/clipboard-copy/react.js +0 -373
- package/patternfly-docs/generated/components/code-block/react.js +0 -148
- package/patternfly-docs/generated/components/code-editor/react.js +0 -659
- package/patternfly-docs/generated/components/compass/react-demos.js +0 -147
- package/patternfly-docs/generated/components/compass/react.js +0 -440
- package/patternfly-docs/generated/components/content/react.js +0 -248
- package/patternfly-docs/generated/components/data-list/react-demos.js +0 -90
- package/patternfly-docs/generated/components/data-list/react.js +0 -709
- package/patternfly-docs/generated/components/date-and-time/calendar-month/react.js +0 -283
- package/patternfly-docs/generated/components/date-and-time/date-and-time-picker/react-demos.js +0 -64
- package/patternfly-docs/generated/components/date-and-time/date-picker/react-demos.js +0 -83
- package/patternfly-docs/generated/components/date-and-time/date-picker/react.js +0 -395
- package/patternfly-docs/generated/components/date-and-time/time-picker/react.js +0 -241
- package/patternfly-docs/generated/components/description-list/react-demos.js +0 -58
- package/patternfly-docs/generated/components/description-list/react.js +0 -743
- package/patternfly-docs/generated/components/divider/react.js +0 -126
- package/patternfly-docs/generated/components/drag-and-drop/react-demos.js +0 -351
- package/patternfly-docs/generated/components/drag-and-drop/react-deprecated.js +0 -184
- package/patternfly-docs/generated/components/drag-and-drop/react.js +0 -137
- package/patternfly-docs/generated/components/drawer/react.js +0 -598
- package/patternfly-docs/generated/components/dual-list-selector/react-deprecated.js +0 -772
- package/patternfly-docs/generated/components/dual-list-selector/react.js +0 -594
- package/patternfly-docs/generated/components/empty-state/react.js +0 -199
- package/patternfly-docs/generated/components/expandable-section/react-demos.js +0 -65
- package/patternfly-docs/generated/components/expandable-section/react.js +0 -408
- package/patternfly-docs/generated/components/file-upload/multiple-file-upload/react-demos.js +0 -52
- package/patternfly-docs/generated/components/file-upload/multiple-file-upload/react.js +0 -398
- package/patternfly-docs/generated/components/file-upload/simple-file-upload/react.js +0 -749
- package/patternfly-docs/generated/components/forms/checkbox/react.js +0 -222
- package/patternfly-docs/generated/components/forms/form/react.js +0 -1106
- package/patternfly-docs/generated/components/forms/form-select/react.js +0 -208
- package/patternfly-docs/generated/components/forms/radio/react.js +0 -212
- package/patternfly-docs/generated/components/forms/text-area/react.js +0 -160
- package/patternfly-docs/generated/components/forms/text-input/react.js +0 -216
- package/patternfly-docs/generated/components/helper-text/react-demos.js +0 -180
- package/patternfly-docs/generated/components/helper-text/react.js +0 -164
- package/patternfly-docs/generated/components/hero/react.js +0 -88
- package/patternfly-docs/generated/components/hint/react.js +0 -169
- package/patternfly-docs/generated/components/icon/react.js +0 -215
- package/patternfly-docs/generated/components/input-group/react.js +0 -182
- package/patternfly-docs/generated/components/jump-links/react-demos.js +0 -154
- package/patternfly-docs/generated/components/jump-links/react.js +0 -212
- package/patternfly-docs/generated/components/label/react-demos.js +0 -57
- package/patternfly-docs/generated/components/label/react.js +0 -417
- package/patternfly-docs/generated/components/list/react.js +0 -175
- package/patternfly-docs/generated/components/login-page/react.js +0 -587
- package/patternfly-docs/generated/components/masthead/react-demos.js +0 -79
- package/patternfly-docs/generated/components/masthead/react.js +0 -291
- package/patternfly-docs/generated/components/menus/application-launcher/react-demos.js +0 -769
- package/patternfly-docs/generated/components/menus/context-selector/react-demos.js +0 -665
- package/patternfly-docs/generated/components/menus/custom-menus/react-demos.js +0 -187
- package/patternfly-docs/generated/components/menus/dropdown/react-templates.js +0 -163
- package/patternfly-docs/generated/components/menus/dropdown/react.js +0 -998
- package/patternfly-docs/generated/components/menus/menu/react.js +0 -1540
- package/patternfly-docs/generated/components/menus/menu-toggle/react.js +0 -747
- package/patternfly-docs/generated/components/menus/options-menu/react-demos.js +0 -508
- package/patternfly-docs/generated/components/menus/select/react-templates.js +0 -257
- package/patternfly-docs/generated/components/menus/select/react.js +0 -998
- package/patternfly-docs/generated/components/modal/react-deprecated.js +0 -554
- package/patternfly-docs/generated/components/modal/react.js +0 -597
- package/patternfly-docs/generated/components/navigation/react-demos.js +0 -356
- package/patternfly-docs/generated/components/navigation/react.js +0 -409
- package/patternfly-docs/generated/components/notification-badge/react.js +0 -196
- package/patternfly-docs/generated/components/notification-drawer/react-demos.js +0 -107
- package/patternfly-docs/generated/components/notification-drawer/react.js +0 -394
- package/patternfly-docs/generated/components/number-input/react.js +0 -210
- package/patternfly-docs/generated/components/overflow-menu/react.js +0 -274
- package/patternfly-docs/generated/components/page/react-demos.js +0 -149
- package/patternfly-docs/generated/components/page/react.js +0 -1352
- package/patternfly-docs/generated/components/pagination/react.js +0 -492
- package/patternfly-docs/generated/components/panel/react.js +0 -236
- package/patternfly-docs/generated/components/popover/react.js +0 -390
- package/patternfly-docs/generated/components/progress/react-demos.js +0 -59
- package/patternfly-docs/generated/components/progress/react.js +0 -283
- package/patternfly-docs/generated/components/progress-stepper/react-demos.js +0 -45
- package/patternfly-docs/generated/components/progress-stepper/react.js +0 -219
- package/patternfly-docs/generated/components/search-input/react-demos.js +0 -113
- package/patternfly-docs/generated/components/search-input/react.js +0 -263
- package/patternfly-docs/generated/components/sidebar/react.js +0 -236
- package/patternfly-docs/generated/components/simple-list/react.js +0 -200
- package/patternfly-docs/generated/components/skeleton/react-demos.js +0 -44
- package/patternfly-docs/generated/components/skeleton/react.js +0 -122
- package/patternfly-docs/generated/components/skip-to-content/react.js +0 -73
- package/patternfly-docs/generated/components/slider/react.js +0 -309
- package/patternfly-docs/generated/components/spinner/react.js +0 -111
- package/patternfly-docs/generated/components/switch/react.js +0 -163
- package/patternfly-docs/generated/components/table/react-demos.js +0 -355
- package/patternfly-docs/generated/components/table/react-deprecated.js +0 -1350
- package/patternfly-docs/generated/components/table/react.js +0 -3241
- package/patternfly-docs/generated/components/tabs/react-demos.js +0 -108
- package/patternfly-docs/generated/components/tabs/react.js +0 -1359
- package/patternfly-docs/generated/components/text-input-group/react-demos.js +0 -152
- package/patternfly-docs/generated/components/text-input-group/react.js +0 -278
- package/patternfly-docs/generated/components/tile/react-deprecated.js +0 -242
- package/patternfly-docs/generated/components/timestamp/react.js +0 -283
- package/patternfly-docs/generated/components/title/react.js +0 -94
- package/patternfly-docs/generated/components/toggle-group/react.js +0 -299
- package/patternfly-docs/generated/components/toolbar/react-demos.js +0 -66
- package/patternfly-docs/generated/components/toolbar/react.js +0 -932
- package/patternfly-docs/generated/components/tooltip/react.js +0 -241
- package/patternfly-docs/generated/components/tree-view/react.js +0 -429
- package/patternfly-docs/generated/components/truncate/react.js +0 -211
- package/patternfly-docs/generated/components/wizard/react-demos.js +0 -87
- package/patternfly-docs/generated/components/wizard/react-deprecated.js +0 -788
- package/patternfly-docs/generated/components/wizard/react.js +0 -986
- package/patternfly-docs/generated/developer-guides/open-ui-automation/react.js +0 -285
- package/patternfly-docs/generated/foundations-and-styles/layouts/bullseye/react.js +0 -70
- package/patternfly-docs/generated/foundations-and-styles/layouts/flex/react.js +0 -506
- package/patternfly-docs/generated/foundations-and-styles/layouts/gallery/react.js +0 -94
- package/patternfly-docs/generated/foundations-and-styles/layouts/grid/react.js +0 -272
- package/patternfly-docs/generated/foundations-and-styles/layouts/level/react.js +0 -87
- package/patternfly-docs/generated/foundations-and-styles/layouts/split/react.js +0 -124
- package/patternfly-docs/generated/foundations-and-styles/layouts/stack/react.js +0 -112
- package/patternfly-docs/generated/index.js +0 -1769
- package/patternfly-docs/generated/patterns/card-view/react-demos.js +0 -78
- package/patternfly-docs/generated/patterns/filters/react-demos.js +0 -141
- package/patternfly-docs/generated/patterns/password-generator/react-demos.js +0 -51
- package/patternfly-docs/generated/patterns/password-strength/react-demos.js +0 -61
- package/patternfly-docs/generated/patterns/primary-detail/react-demos.js +0 -124
- package/patternfly-docs/generated/patterns/right-to-left/react-demos.js +0 -81
|
@@ -1,848 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { AutoLinkHeader, Example, Link as PatternflyThemeLink } from '@patternfly/documentation-framework/components';
|
|
3
|
-
import { createRef } from 'react';
|
|
4
|
-
import { ChartAxis, ChartBullet, ChartContainer, ChartThemeColor } from '@patternfly/react-charts/victory';
|
|
5
|
-
import { getResizeObserver } from '@patternfly/react-core';
|
|
6
|
-
const pageData = {
|
|
7
|
-
"id": "Bullet chart",
|
|
8
|
-
"section": "components",
|
|
9
|
-
"subsection": "charts",
|
|
10
|
-
"deprecated": false,
|
|
11
|
-
"template": false,
|
|
12
|
-
"beta": false,
|
|
13
|
-
"demo": false,
|
|
14
|
-
"newImplementationLink": false,
|
|
15
|
-
"source": "-Victory",
|
|
16
|
-
"tabName": null,
|
|
17
|
-
"slug": "/components/charts/bullet-chart/-Victory",
|
|
18
|
-
"sourceLink": "https://github.com/patternfly/patternfly-org/blob/main/packages/react-charts/src/victory/components/ChartBullet/examples/ChartBullet.md",
|
|
19
|
-
"relPath": "packages/react-charts/src/victory/components/ChartBullet/examples/ChartBullet.md",
|
|
20
|
-
"propComponents": [
|
|
21
|
-
{
|
|
22
|
-
"name": "ChartAxis",
|
|
23
|
-
"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",
|
|
24
|
-
"props": [
|
|
25
|
-
{
|
|
26
|
-
"name": "animate",
|
|
27
|
-
"type": "boolean | object",
|
|
28
|
-
"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})})}"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"name": "axisComponent",
|
|
32
|
-
"type": "React.ReactElement<any>",
|
|
33
|
-
"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."
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"name": "axisLabelComponent",
|
|
37
|
-
"type": "React.ReactElement<any>",
|
|
38
|
-
"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",
|
|
39
|
-
"defaultValue": "<ChartLabel />"
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"name": "axisValue",
|
|
43
|
-
"type": "number | string | object | Date",
|
|
44
|
-
"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."
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
"name": "containerComponent",
|
|
48
|
-
"type": "React.ReactElement<any>",
|
|
49
|
-
"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 ...\" />",
|
|
50
|
-
"defaultValue": "<ChartContainer />"
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
"name": "crossAxis",
|
|
54
|
-
"type": "boolean",
|
|
55
|
-
"description": "This prop specifies whether a given axis is intended to cross another axis."
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
"name": "dependentAxis",
|
|
59
|
-
"type": "boolean",
|
|
60
|
-
"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."
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
"name": "domain",
|
|
64
|
-
"type": "number[] | { x: number[], y: number[] }",
|
|
65
|
-
"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]}"
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
"name": "domainPadding",
|
|
69
|
-
"type": "number | number[] | { x: number[], y: number[] }",
|
|
70
|
-
"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}"
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
"name": "events",
|
|
74
|
-
"type": "object[]",
|
|
75
|
-
"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]}"
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
"name": "externalEventMutations",
|
|
79
|
-
"type": "object[]",
|
|
80
|
-
"description": "ChartAxis uses the standard externalEventMutations prop."
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
"name": "fixAxisLabelHeight",
|
|
84
|
-
"type": "boolean",
|
|
85
|
-
"description": "When true, this prop adjusts the height between the axis label and bottom positioned legend"
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
"name": "fixLabelOverlap",
|
|
89
|
-
"type": "boolean",
|
|
90
|
-
"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."
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
"name": "gridComponent",
|
|
94
|
-
"type": "React.ReactElement<any>",
|
|
95
|
-
"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."
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
"name": "groupComponent",
|
|
99
|
-
"type": "React.ReactElement<any>",
|
|
100
|
-
"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"
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
"name": "height",
|
|
104
|
-
"type": "number",
|
|
105
|
-
"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."
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
"name": "invertAxis",
|
|
109
|
-
"type": "boolean",
|
|
110
|
-
"description": "If true, this value will flip the domain of a given axis."
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
"name": "label",
|
|
114
|
-
"type": "any",
|
|
115
|
-
"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."
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
"name": "maxDomain",
|
|
119
|
-
"type": "number | { x?: number; y?: number }",
|
|
120
|
-
"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 }}"
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
"name": "minDomain",
|
|
124
|
-
"type": "number | { x?: number; y?: number }",
|
|
125
|
-
"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 }}"
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
"name": "name",
|
|
129
|
-
"type": "string",
|
|
130
|
-
"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."
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
"name": "offsetX",
|
|
134
|
-
"type": "number",
|
|
135
|
-
"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."
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
"name": "offsetY",
|
|
139
|
-
"type": "number",
|
|
140
|
-
"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."
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
"name": "orientation",
|
|
144
|
-
"type": "string",
|
|
145
|
-
"description": "The orientation prop specifies the position and orientation of your axis.\nValid values are 'top', 'bottom', 'left' and 'right'."
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
"name": "padding",
|
|
149
|
-
"type": "number | { top: number, bottom: number, left: number, right: number }",
|
|
150
|
-
"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."
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
"name": "range",
|
|
154
|
-
"type": "number[] | { x: number[], y: number[] }",
|
|
155
|
-
"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] }}"
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
"name": "scale",
|
|
159
|
-
"type": "string | { x: string, y: string }",
|
|
160
|
-
"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\"}"
|
|
161
|
-
},
|
|
162
|
-
{
|
|
163
|
-
"name": "showGrid",
|
|
164
|
-
"type": "boolean",
|
|
165
|
-
"description": "Show axis grid and ticks",
|
|
166
|
-
"defaultValue": "false"
|
|
167
|
-
},
|
|
168
|
-
{
|
|
169
|
-
"name": "singleQuadrantDomainPadding",
|
|
170
|
-
"type": "boolean | { x?: boolean; y?: boolean }",
|
|
171
|
-
"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 }}"
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
"name": "standalone",
|
|
175
|
-
"type": "boolean",
|
|
176
|
-
"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."
|
|
177
|
-
},
|
|
178
|
-
{
|
|
179
|
-
"name": "style",
|
|
180
|
-
"type": "{ axis: object, axisLabel: object, grid: object, ticks: object, tickLabels: object }",
|
|
181
|
-
"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."
|
|
182
|
-
},
|
|
183
|
-
{
|
|
184
|
-
"name": "theme",
|
|
185
|
-
"type": "object",
|
|
186
|
-
"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.",
|
|
187
|
-
"defaultValue": "getTheme(themeColor)"
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
"name": "themeColor",
|
|
191
|
-
"type": "string",
|
|
192
|
-
"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}"
|
|
193
|
-
},
|
|
194
|
-
{
|
|
195
|
-
"name": "tickComponent",
|
|
196
|
-
"type": "React.ReactElement<any>",
|
|
197
|
-
"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."
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
"name": "tickCount",
|
|
201
|
-
"type": "number",
|
|
202
|
-
"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."
|
|
203
|
-
},
|
|
204
|
-
{
|
|
205
|
-
"name": "tickFormat",
|
|
206
|
-
"type": "any[] | ((tick: any, index: number, ticks: any[]) => string | number)",
|
|
207
|
-
"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\"]"
|
|
208
|
-
},
|
|
209
|
-
{
|
|
210
|
-
"name": "tickLabelComponent",
|
|
211
|
-
"type": "React.ReactElement<any>",
|
|
212
|
-
"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",
|
|
213
|
-
"defaultValue": "<ChartLabel />"
|
|
214
|
-
},
|
|
215
|
-
{
|
|
216
|
-
"name": "tickValues",
|
|
217
|
-
"type": "any[]",
|
|
218
|
-
"description": "The tickValues prop explicitly specifies which tick values to draw on the axis.\n\n@example [\"apples\", \"bananas\", \"oranges\"], [2, 4, 6, 8]"
|
|
219
|
-
},
|
|
220
|
-
{
|
|
221
|
-
"name": "width",
|
|
222
|
-
"type": "number",
|
|
223
|
-
"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."
|
|
224
|
-
}
|
|
225
|
-
]
|
|
226
|
-
},
|
|
227
|
-
{
|
|
228
|
-
"name": "ChartBullet",
|
|
229
|
-
"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",
|
|
230
|
-
"props": [
|
|
231
|
-
{
|
|
232
|
-
"name": "allowTooltip",
|
|
233
|
-
"type": "boolean",
|
|
234
|
-
"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.",
|
|
235
|
-
"defaultValue": "true"
|
|
236
|
-
},
|
|
237
|
-
{
|
|
238
|
-
"name": "ariaDesc",
|
|
239
|
-
"type": "string",
|
|
240
|
-
"description": "The ariaDesc prop specifies the description of the chart/SVG to assist with\naccessibility for screen readers."
|
|
241
|
-
},
|
|
242
|
-
{
|
|
243
|
-
"name": "ariaTitle",
|
|
244
|
-
"type": "string",
|
|
245
|
-
"description": "The ariaTitle prop specifies the title to be applied to the SVG to assist\naccessibility for screen readers."
|
|
246
|
-
},
|
|
247
|
-
{
|
|
248
|
-
"name": "axisComponent",
|
|
249
|
-
"type": "React.ReactElement<any>",
|
|
250
|
-
"description": "The axis component to render with the chart",
|
|
251
|
-
"defaultValue": "<ChartAxis />"
|
|
252
|
-
},
|
|
253
|
-
{
|
|
254
|
-
"name": "bulletSize",
|
|
255
|
-
"type": "number",
|
|
256
|
-
"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",
|
|
257
|
-
"defaultValue": "theme.chart.height"
|
|
258
|
-
},
|
|
259
|
-
{
|
|
260
|
-
"name": "comparativeErrorMeasureComponent",
|
|
261
|
-
"type": "React.ReactElement<any>",
|
|
262
|
-
"description": "The comparative error measure component to render with the chart",
|
|
263
|
-
"defaultValue": "<ChartBulletComparativeErrorMeasure />"
|
|
264
|
-
},
|
|
265
|
-
{
|
|
266
|
-
"name": "comparativeErrorMeasureData",
|
|
267
|
-
"type": "any[]",
|
|
268
|
-
"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 }]}"
|
|
269
|
-
},
|
|
270
|
-
{
|
|
271
|
-
"name": "comparativeErrorMeasureDataY",
|
|
272
|
-
"type": "number | string | Function | string[]",
|
|
273
|
-
"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)"
|
|
274
|
-
},
|
|
275
|
-
{
|
|
276
|
-
"name": "comparativeErrorMeasureLegendData",
|
|
277
|
-
"type": "{\n name?: string;\n symbol?: {\n fill?: string;\n type?: string;\n };\n}[]",
|
|
278
|
-
"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' }]}"
|
|
279
|
-
},
|
|
280
|
-
{
|
|
281
|
-
"name": "comparativeWarningMeasureComponent",
|
|
282
|
-
"type": "React.ReactElement<any>",
|
|
283
|
-
"description": "The comparative warning measure component to render with the chart",
|
|
284
|
-
"defaultValue": "<ChartBulletComparativeWarningMeasure />"
|
|
285
|
-
},
|
|
286
|
-
{
|
|
287
|
-
"name": "comparativeWarningMeasureData",
|
|
288
|
-
"type": "any[]",
|
|
289
|
-
"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 }]}"
|
|
290
|
-
},
|
|
291
|
-
{
|
|
292
|
-
"name": "comparativeWarningMeasureDataY",
|
|
293
|
-
"type": "number | string | Function | string[]",
|
|
294
|
-
"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)"
|
|
295
|
-
},
|
|
296
|
-
{
|
|
297
|
-
"name": "comparativeWarningMeasureLegendData",
|
|
298
|
-
"type": "{\n name?: string;\n symbol?: {\n fill?: string;\n type?: string;\n };\n}[]",
|
|
299
|
-
"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' }]}"
|
|
300
|
-
},
|
|
301
|
-
{
|
|
302
|
-
"name": "comparativeZeroMeasureComponent",
|
|
303
|
-
"type": "React.ReactElement<any>",
|
|
304
|
-
"description": "The comparative zero measure component to render with the chart",
|
|
305
|
-
"defaultValue": "<ChartBulletComparativeMeasure />"
|
|
306
|
-
},
|
|
307
|
-
{
|
|
308
|
-
"name": "constrainToVisibleArea",
|
|
309
|
-
"type": "boolean",
|
|
310
|
-
"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.",
|
|
311
|
-
"defaultValue": "false"
|
|
312
|
-
},
|
|
313
|
-
{
|
|
314
|
-
"name": "domain",
|
|
315
|
-
"type": "number[] | { x: number[], y: number[] }",
|
|
316
|
-
"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]}",
|
|
317
|
-
"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})"
|
|
318
|
-
},
|
|
319
|
-
{
|
|
320
|
-
"name": "groupSubTitle",
|
|
321
|
-
"type": "string",
|
|
322
|
-
"description": "The subtitle to render for grouped bullets"
|
|
323
|
-
},
|
|
324
|
-
{
|
|
325
|
-
"name": "groupTitle",
|
|
326
|
-
"type": "string",
|
|
327
|
-
"description": "The title to render for grouped bullets"
|
|
328
|
-
},
|
|
329
|
-
{
|
|
330
|
-
"name": "groupTitleComponent",
|
|
331
|
-
"type": "React.ReactElement<any>",
|
|
332
|
-
"description": "The group title component to render for grouped bullets",
|
|
333
|
-
"defaultValue": "<ChartBulletGroupTitle />"
|
|
334
|
-
},
|
|
335
|
-
{
|
|
336
|
-
"name": "height",
|
|
337
|
-
"type": "number",
|
|
338
|
-
"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.",
|
|
339
|
-
"defaultValue": "horizontal ? theme.chart.height : theme.chart.width"
|
|
340
|
-
},
|
|
341
|
-
{
|
|
342
|
-
"name": "horizontal",
|
|
343
|
-
"type": "boolean",
|
|
344
|
-
"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.",
|
|
345
|
-
"defaultValue": "true"
|
|
346
|
-
},
|
|
347
|
-
{
|
|
348
|
-
"name": "invert",
|
|
349
|
-
"type": "boolean",
|
|
350
|
-
"description": "Invert the color scales used to represent primary measures and qualitative ranges.",
|
|
351
|
-
"defaultValue": "false"
|
|
352
|
-
},
|
|
353
|
-
{
|
|
354
|
-
"name": "labels",
|
|
355
|
-
"type": "string[] | number[] | ((data: any) => string | number | null)",
|
|
356
|
-
"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"
|
|
357
|
-
},
|
|
358
|
-
{
|
|
359
|
-
"name": "legendAllowWrap",
|
|
360
|
-
"type": "boolean | ((extraHeight: number) => void)",
|
|
361
|
-
"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",
|
|
362
|
-
"defaultValue": "false"
|
|
363
|
-
},
|
|
364
|
-
{
|
|
365
|
-
"name": "legendComponent",
|
|
366
|
-
"type": "React.ReactElement<any>",
|
|
367
|
-
"description": "The legend component to render with chart.",
|
|
368
|
-
"defaultValue": "<ChartLegend />"
|
|
369
|
-
},
|
|
370
|
-
{
|
|
371
|
-
"name": "legendDirection",
|
|
372
|
-
"type": "'ltr' | 'rtl'",
|
|
373
|
-
"description": "Text direction of the legend labels.",
|
|
374
|
-
"defaultValue": "'ltr'"
|
|
375
|
-
},
|
|
376
|
-
{
|
|
377
|
-
"name": "legendItemsPerRow",
|
|
378
|
-
"type": "number",
|
|
379
|
-
"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."
|
|
380
|
-
},
|
|
381
|
-
{
|
|
382
|
-
"name": "legendOrientation",
|
|
383
|
-
"type": "'horizontal' | 'vertical'",
|
|
384
|
-
"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.",
|
|
385
|
-
"defaultValue": "theme.legend.orientation"
|
|
386
|
-
},
|
|
387
|
-
{
|
|
388
|
-
"name": "legendPosition",
|
|
389
|
-
"type": "'bottom' | 'bottom-left' | 'right'",
|
|
390
|
-
"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.",
|
|
391
|
-
"defaultValue": "'bottom'"
|
|
392
|
-
},
|
|
393
|
-
{
|
|
394
|
-
"name": "maxDomain",
|
|
395
|
-
"type": "number | { x?: number; y?: number }",
|
|
396
|
-
"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"
|
|
397
|
-
},
|
|
398
|
-
{
|
|
399
|
-
"name": "minDomain",
|
|
400
|
-
"type": "number | { x?: number; y?: number }",
|
|
401
|
-
"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"
|
|
402
|
-
},
|
|
403
|
-
{
|
|
404
|
-
"name": "name",
|
|
405
|
-
"type": "string",
|
|
406
|
-
"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."
|
|
407
|
-
},
|
|
408
|
-
{
|
|
409
|
-
"name": "padding",
|
|
410
|
-
"type": "number | { top: number, bottom: number, left: number, right: number }",
|
|
411
|
-
"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."
|
|
412
|
-
},
|
|
413
|
-
{
|
|
414
|
-
"name": "primaryDotMeasureComponent",
|
|
415
|
-
"type": "React.ReactElement<any>",
|
|
416
|
-
"description": "The primary dot measure component to render with the chart",
|
|
417
|
-
"defaultValue": "<ChartBulletPrimaryDotMeasure />"
|
|
418
|
-
},
|
|
419
|
-
{
|
|
420
|
-
"name": "primaryDotMeasureData",
|
|
421
|
-
"type": "any[]",
|
|
422
|
-
"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 }]}"
|
|
423
|
-
},
|
|
424
|
-
{
|
|
425
|
-
"name": "primaryDotMeasureDataY",
|
|
426
|
-
"type": "number | string | Function | string[]",
|
|
427
|
-
"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)"
|
|
428
|
-
},
|
|
429
|
-
{
|
|
430
|
-
"name": "primaryDotMeasureLegendData",
|
|
431
|
-
"type": "{\n name?: string;\n symbol?: {\n fill?: string;\n type?: string;\n };\n}[]",
|
|
432
|
-
"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' }]}"
|
|
433
|
-
},
|
|
434
|
-
{
|
|
435
|
-
"name": "primarySegmentedMeasureComponent",
|
|
436
|
-
"type": "React.ReactElement<any>",
|
|
437
|
-
"description": "The primary segmented measure component to render with the chart",
|
|
438
|
-
"defaultValue": "<ChartBulletPrimarySegmentedMeasure />"
|
|
439
|
-
},
|
|
440
|
-
{
|
|
441
|
-
"name": "primarySegmentedMeasureData",
|
|
442
|
-
"type": "any[]",
|
|
443
|
-
"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 }]}"
|
|
444
|
-
},
|
|
445
|
-
{
|
|
446
|
-
"name": "primarySegmentedMeasureDataY",
|
|
447
|
-
"type": "number | string | Function | string[]",
|
|
448
|
-
"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)"
|
|
449
|
-
},
|
|
450
|
-
{
|
|
451
|
-
"name": "primarySegmentedMeasureLegendData",
|
|
452
|
-
"type": "{\n name?: string;\n symbol?: {\n fill?: string;\n type?: string;\n };\n}[]",
|
|
453
|
-
"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' }]}"
|
|
454
|
-
},
|
|
455
|
-
{
|
|
456
|
-
"name": "qualitativeRangeComponent",
|
|
457
|
-
"type": "React.ReactElement<any>",
|
|
458
|
-
"description": "The qualitative range component to render with the chart",
|
|
459
|
-
"defaultValue": "<ChartBulletQualitativeRange />"
|
|
460
|
-
},
|
|
461
|
-
{
|
|
462
|
-
"name": "qualitativeRangeData",
|
|
463
|
-
"type": "any[]",
|
|
464
|
-
"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 }]}"
|
|
465
|
-
},
|
|
466
|
-
{
|
|
467
|
-
"name": "qualitativeRangeDataY",
|
|
468
|
-
"type": "number | string | Function | string[]",
|
|
469
|
-
"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)"
|
|
470
|
-
},
|
|
471
|
-
{
|
|
472
|
-
"name": "qualitativeRangeDataY0",
|
|
473
|
-
"type": "number | string | Function | string[]",
|
|
474
|
-
"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\"]"
|
|
475
|
-
},
|
|
476
|
-
{
|
|
477
|
-
"name": "qualitativeRangeLegendData",
|
|
478
|
-
"type": "{\n name?: string;\n symbol?: {\n fill?: string;\n type?: string;\n };\n}[]",
|
|
479
|
-
"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' }]}"
|
|
480
|
-
},
|
|
481
|
-
{
|
|
482
|
-
"name": "standalone",
|
|
483
|
-
"type": "boolean",
|
|
484
|
-
"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.",
|
|
485
|
-
"defaultValue": "true"
|
|
486
|
-
},
|
|
487
|
-
{
|
|
488
|
-
"name": "subTitle",
|
|
489
|
-
"type": "string",
|
|
490
|
-
"description": "The subtitle for the chart"
|
|
491
|
-
},
|
|
492
|
-
{
|
|
493
|
-
"name": "theme",
|
|
494
|
-
"type": "object",
|
|
495
|
-
"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.",
|
|
496
|
-
"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})"
|
|
497
|
-
},
|
|
498
|
-
{
|
|
499
|
-
"name": "themeColor",
|
|
500
|
-
"type": "string",
|
|
501
|
-
"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}"
|
|
502
|
-
},
|
|
503
|
-
{
|
|
504
|
-
"name": "title",
|
|
505
|
-
"type": "string",
|
|
506
|
-
"description": "The title for the chart"
|
|
507
|
-
},
|
|
508
|
-
{
|
|
509
|
-
"name": "titleComponent",
|
|
510
|
-
"type": "React.ReactElement<any>",
|
|
511
|
-
"description": "The label component to render the chart title.",
|
|
512
|
-
"defaultValue": "<ChartBulletTitle />"
|
|
513
|
-
},
|
|
514
|
-
{
|
|
515
|
-
"name": "titlePosition",
|
|
516
|
-
"type": "'left' | 'top-left'",
|
|
517
|
-
"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"
|
|
518
|
-
},
|
|
519
|
-
{
|
|
520
|
-
"name": "width",
|
|
521
|
-
"type": "number",
|
|
522
|
-
"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.",
|
|
523
|
-
"defaultValue": "horizontal ? theme.chart.width : theme.chart.height"
|
|
524
|
-
}
|
|
525
|
-
]
|
|
526
|
-
},
|
|
527
|
-
{
|
|
528
|
-
"name": "ChartContainer",
|
|
529
|
-
"description": "ChartContainer provides a top-level <svg> element for other Victory based components to render within. By default,\nChartContainer renders responsive SVGs.\n\nSee https://github.com/FormidableLabs/victory/blob/main/packages/victory-core/src/victory-container/victory-container.tsx",
|
|
530
|
-
"props": [
|
|
531
|
-
{
|
|
532
|
-
"name": "children",
|
|
533
|
-
"type": "React.ReactElement<any> | React.ReactElement<any>[]",
|
|
534
|
-
"description": "The children prop specifies the child or children that will be rendered within the container. It will be set by\nwhatever Victory component is rendering the container."
|
|
535
|
-
},
|
|
536
|
-
{
|
|
537
|
-
"name": "className",
|
|
538
|
-
"type": "string",
|
|
539
|
-
"description": "The className prop specifies a className that will be applied to the outermost div rendered by ChartContainer"
|
|
540
|
-
},
|
|
541
|
-
{
|
|
542
|
-
"name": "containerId",
|
|
543
|
-
"type": "number | string",
|
|
544
|
-
"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."
|
|
545
|
-
},
|
|
546
|
-
{
|
|
547
|
-
"name": "containerRef",
|
|
548
|
-
"type": "React.RefObject<HTMLElement | null>",
|
|
549
|
-
"description": "The containerRef prop may be used to attach a ref to the outermost element rendered by the container.\n\n@example containerRef={(ref) => { this.chartRef = ref; }}"
|
|
550
|
-
},
|
|
551
|
-
{
|
|
552
|
-
"name": "desc",
|
|
553
|
-
"type": "string",
|
|
554
|
-
"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.\""
|
|
555
|
-
},
|
|
556
|
-
{
|
|
557
|
-
"name": "events",
|
|
558
|
-
"type": "React.DOMAttributes<any>",
|
|
559
|
-
"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}`)}"
|
|
560
|
-
},
|
|
561
|
-
{
|
|
562
|
-
"name": "height",
|
|
563
|
-
"type": "number",
|
|
564
|
-
"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."
|
|
565
|
-
},
|
|
566
|
-
{
|
|
567
|
-
"name": "name",
|
|
568
|
-
"type": "string",
|
|
569
|
-
"description": "The name prop is used to reference a component instance when defining shared events."
|
|
570
|
-
},
|
|
571
|
-
{
|
|
572
|
-
"name": "origin",
|
|
573
|
-
"type": "{ x: number, y: number }",
|
|
574
|
-
"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"
|
|
575
|
-
},
|
|
576
|
-
{
|
|
577
|
-
"name": "portalComponent",
|
|
578
|
-
"type": "React.ReactElement<any>",
|
|
579
|
-
"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. VictoryTooltip 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."
|
|
580
|
-
},
|
|
581
|
-
{
|
|
582
|
-
"name": "portalZIndex",
|
|
583
|
-
"type": "number",
|
|
584
|
-
"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."
|
|
585
|
-
},
|
|
586
|
-
{
|
|
587
|
-
"name": "responsive",
|
|
588
|
-
"type": "boolean",
|
|
589
|
-
"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."
|
|
590
|
-
},
|
|
591
|
-
{
|
|
592
|
-
"name": "style",
|
|
593
|
-
"type": "React.CSSProperties",
|
|
594
|
-
"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}"
|
|
595
|
-
},
|
|
596
|
-
{
|
|
597
|
-
"name": "tabIndex",
|
|
598
|
-
"type": "number",
|
|
599
|
-
"description": "The tabIndex prop specifies the description of the chart/SVG to assist with accessibility."
|
|
600
|
-
},
|
|
601
|
-
{
|
|
602
|
-
"name": "theme",
|
|
603
|
-
"type": "object",
|
|
604
|
-
"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.",
|
|
605
|
-
"defaultValue": "getTheme(themeColor)"
|
|
606
|
-
},
|
|
607
|
-
{
|
|
608
|
-
"name": "themeColor",
|
|
609
|
-
"type": "string",
|
|
610
|
-
"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}"
|
|
611
|
-
},
|
|
612
|
-
{
|
|
613
|
-
"name": "title",
|
|
614
|
-
"type": "string",
|
|
615
|
-
"description": "The title prop specifies the title to be applied to the SVG to assist\naccessibility for screen readers. The more descriptive this title is, the more\nuseful it will be. If no title prop is passed, it will default to Chart.\n\n@example \"Popularity of Dog Breeds by Percentage\""
|
|
616
|
-
},
|
|
617
|
-
{
|
|
618
|
-
"name": "width",
|
|
619
|
-
"type": "number",
|
|
620
|
-
"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."
|
|
621
|
-
}
|
|
622
|
-
]
|
|
623
|
-
}
|
|
624
|
-
],
|
|
625
|
-
"examples": [
|
|
626
|
-
"Basic",
|
|
627
|
-
"Segmented primary measure",
|
|
628
|
-
"Responsive container with bottom aligned legend",
|
|
629
|
-
"Primary measure dot",
|
|
630
|
-
"Error measure and custom axis ticks",
|
|
631
|
-
"Primary measure outside range",
|
|
632
|
-
"Negative primary measure",
|
|
633
|
-
"Reversed with right aligned legend",
|
|
634
|
-
"Negative and positive primary measures",
|
|
635
|
-
"Vertical with segmented primary measure",
|
|
636
|
-
"Vertical primary measure outside max range",
|
|
637
|
-
"Custom labels",
|
|
638
|
-
"Custom size",
|
|
639
|
-
"Horizontal group",
|
|
640
|
-
"Vertical group",
|
|
641
|
-
"Horizontal group with title",
|
|
642
|
-
"Vertical group with title"
|
|
643
|
-
]
|
|
644
|
-
};
|
|
645
|
-
pageData.liveContext = {
|
|
646
|
-
createRef,
|
|
647
|
-
ChartAxis,
|
|
648
|
-
ChartBullet,
|
|
649
|
-
ChartContainer,
|
|
650
|
-
ChartThemeColor,
|
|
651
|
-
getResizeObserver
|
|
652
|
-
};
|
|
653
|
-
pageData.examples = {
|
|
654
|
-
'Basic': props =>
|
|
655
|
-
<Example {...pageData} {...props} {...{"code":"import { ChartBullet } from '@patternfly/react-charts/victory';\n\ninterface ChartData {\n name: string;\n y: number;\n}\n\nexport const ChartBulletBasic: React.FunctionComponent = () => {\n const comparativeWarningMeasureData: ChartData[] = [{ name: 'Warning', y: 88 }];\n const primarySegmentedMeasureData: ChartData[] = [{ name: 'Measure', y: 60 }];\n const qualitativeRangeData: ChartData[] = [\n { name: 'Range', y: 50 },\n { name: 'Range', y: 75 }\n ];\n\n return (\n <div style={{ height: '150px', width: '600px' }}>\n <ChartBullet\n ariaDesc=\"Storage capacity\"\n ariaTitle=\"Bullet chart example\"\n comparativeWarningMeasureData={comparativeWarningMeasureData}\n constrainToVisibleArea\n height={150}\n labels={({ datum }) => `${datum.name}: ${datum.y}`}\n maxDomain={{ y: 100 }}\n name=\"chart1\"\n primarySegmentedMeasureData={primarySegmentedMeasureData}\n qualitativeRangeData={qualitativeRangeData}\n width={600}\n />\n </div>\n );\n};\n","title":"Basic","lang":"ts","className":""}}>
|
|
656
|
-
|
|
657
|
-
</Example>,
|
|
658
|
-
'Segmented primary measure': props =>
|
|
659
|
-
<Example {...pageData} {...props} {...{"code":"import { ChartBullet } from '@patternfly/react-charts/victory';\n\ninterface ChartData {\n name: string;\n y?: number;\n}\n\nexport const ChartBulletSegmentedMeasure: React.FunctionComponent = () => {\n const comparativeWarningMeasureData: ChartData[] = [{ name: 'Warning', y: 88 }];\n const comparativeWarningMeasureLegendData: ChartData[] = [{ name: 'Warning' }];\n const primarySegmentedMeasureData: ChartData[] = [\n { name: 'Measure', y: 25 },\n { name: 'Measure', y: 60 }\n ];\n const primarySegmentedMeasureLegendData: ChartData[] = [{ name: 'Measure 1' }, { name: 'Measure 2' }];\n const qualitativeRangeData: ChartData[] = [\n { name: 'Range', y: 50 },\n { name: 'Range', y: 75 }\n ];\n const qualitativeRangeLegendData: ChartData[] = [{ name: 'Range 1' }, { name: 'Range 2' }];\n\n return (\n <div style={{ height: '200px', width: '600px' }}>\n <ChartBullet\n ariaDesc=\"Storage capacity\"\n ariaTitle=\"Bullet chart example\"\n comparativeWarningMeasureData={comparativeWarningMeasureData}\n comparativeWarningMeasureLegendData={comparativeWarningMeasureLegendData}\n constrainToVisibleArea\n height={200}\n labels={({ datum }) => `${datum.name}: ${datum.y}`}\n maxDomain={{ y: 100 }}\n name=\"chart2\"\n padding={{\n bottom: 50,\n left: 150, // Adjusted to accommodate labels\n right: 50,\n top: 50\n }}\n primarySegmentedMeasureData={primarySegmentedMeasureData}\n primarySegmentedMeasureLegendData={primarySegmentedMeasureLegendData}\n qualitativeRangeData={qualitativeRangeData}\n qualitativeRangeLegendData={qualitativeRangeLegendData}\n subTitle=\"Measure details\"\n title=\"Text label\"\n width={600}\n />\n </div>\n );\n};\n","title":"Segmented primary measure","lang":"ts","className":""}}>
|
|
660
|
-
|
|
661
|
-
</Example>,
|
|
662
|
-
'Responsive container with bottom aligned legend': props =>
|
|
663
|
-
<Example {...pageData} {...props} {...{"code":"import { ChartBullet } from '@patternfly/react-charts/victory';\nimport { getResizeObserver } from '@patternfly/react-core';\n\ninterface ChartData {\n name: string;\n y?: number;\n}\n\nexport const BulletChartResponsiveLegend: React.FunctionComponent = () => {\n const containerRef = React.useRef<HTMLDivElement>(null);\n const [extraHeight, setExtraHeight] = React.useState<number>(0);\n const [width, setWidth] = React.useState<number>(0);\n const comparativeWarningMeasureData: ChartData[] = [{ name: 'Warning', y: 88 }];\n const comparativeWarningMeasureLegendData: ChartData[] = [{ name: 'Warning' }];\n const primarySegmentedMeasureData: ChartData[] = [\n { name: 'Measure', y: 25 },\n { name: 'Measure', y: 60 }\n ];\n const primarySegmentedMeasureLegendData: ChartData[] = [{ name: 'Measure 1' }, { name: 'Measure 2' }];\n const qualitativeRangeData: ChartData[] = [\n { name: 'Range', y: 50 },\n { name: 'Range', y: 75 }\n ];\n const qualitativeRangeLegendData: ChartData[] = [{ name: 'Range 1' }, { name: 'Range 2' }];\n\n const handleResize = (): void => {\n if (containerRef.current && containerRef.current.clientWidth) {\n setWidth(containerRef.current.clientWidth);\n }\n };\n\n const handleLegendAllowWrap = (newExtraHeight: number): void => {\n if (newExtraHeight !== extraHeight) {\n setExtraHeight(newExtraHeight);\n }\n };\n\n const getHeight = (baseHeight: number): number => baseHeight + extraHeight;\n\n React.useEffect(() => {\n let observer: () => void;\n\n if (containerRef.current) {\n observer = getResizeObserver(containerRef.current, handleResize);\n handleResize();\n }\n return () => {\n if (observer) {\n observer();\n }\n };\n }, []);\n\n const height: number = 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 container with bottom aligned legend","lang":"ts","className":""}}>
|
|
664
|
-
|
|
665
|
-
<p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
|
|
666
|
-
{`This demonstrates a responsive legend which wraps when items are wider than its container.`}
|
|
667
|
-
</p>
|
|
668
|
-
</Example>,
|
|
669
|
-
'Primary measure dot': props =>
|
|
670
|
-
<Example {...pageData} {...props} {...{"code":"import { ChartBullet } from '@patternfly/react-charts/victory';\n\ninterface ChartData {\n name: string;\n y?: number;\n}\n\nexport const ChartBulletPrimaryDot: React.FunctionComponent = () => {\n const comparativeWarningMeasureData: ChartData[] = [{ name: 'Warning', y: 88 }];\n const comparativeWarningMeasureLegendData: ChartData[] = [{ name: 'Warning' }];\n const primaryDotMeasureData: ChartData[] = [\n { name: 'Measure', y: 25 },\n { name: 'Measure', y: 60 }\n ];\n const primaryDotMeasureLegendData: ChartData[] = [{ name: 'Measure 1' }, { name: 'Measure 2' }];\n const qualitativeRangeData: ChartData[] = [\n { name: 'Range', y: 50 },\n { name: 'Range', y: 75 }\n ];\n const qualitativeRangeLegendData: ChartData[] = [{ name: 'Range 1' }, { name: 'Range 2' }];\n\n return (\n <div style={{ height: '200px', width: '600px' }}>\n <ChartBullet\n ariaDesc=\"Storage capacity\"\n ariaTitle=\"Bullet chart example\"\n comparativeWarningMeasureData={comparativeWarningMeasureData}\n comparativeWarningMeasureLegendData={comparativeWarningMeasureLegendData}\n constrainToVisibleArea\n height={200}\n labels={({ datum }) => `${datum.name}: ${datum.y}`}\n maxDomain={{ y: 100 }}\n name=\"chart4\"\n padding={{\n bottom: 50,\n left: 150, // Adjusted to accommodate labels\n right: 50,\n top: 50\n }}\n primaryDotMeasureData={primaryDotMeasureData}\n primaryDotMeasureLegendData={primaryDotMeasureLegendData}\n qualitativeRangeData={qualitativeRangeData}\n qualitativeRangeLegendData={qualitativeRangeLegendData}\n subTitle=\"Measure details\"\n title=\"Text label\"\n width={600}\n />\n </div>\n );\n};\n","title":"Primary measure dot","lang":"ts","className":""}}>
|
|
671
|
-
|
|
672
|
-
</Example>,
|
|
673
|
-
'Error measure and custom axis ticks': props =>
|
|
674
|
-
<Example {...pageData} {...props} {...{"code":"import { ChartAxis, ChartBullet, ChartThemeColor } from '@patternfly/react-charts/victory';\n\ninterface ChartData {\n name: string;\n y?: number;\n}\n\nexport const ChartBulletErrorCustomTicks: React.FunctionComponent = () => {\n const comparativeErrorMeasureData: ChartData[] = [{ name: 'Error', y: 120 }];\n const comparativeErrorMeasureLegendData: ChartData[] = [{ name: 'Error' }];\n const comparativeWarningMeasureData: ChartData[] = [{ name: 'Warning', y: 80 }];\n const comparativeWarningMeasureLegendData: ChartData[] = [{ name: 'Warning' }];\n const primarySegmentedMeasureData: ChartData[] = [\n { name: 'Measure', y: 25 },\n { name: 'Measure', y: 75 }\n ];\n const primarySegmentedMeasureLegendData: ChartData[] = [{ name: 'Measure 1' }, { name: 'Measure 2' }];\n const qualitativeRangeData: ChartData[] = [\n { name: 'Range', y: 65 },\n { name: 'Range', y: 100 },\n { name: 'Range', y: 150 }\n ];\n const qualitativeRangeLegendData: ChartData[] = [{ name: 'Range 1' }, { name: 'Range 2' }];\n\n return (\n <div style={{ height: '200px', width: '600px' }}>\n <ChartBullet\n ariaDesc=\"Storage capacity\"\n ariaTitle=\"Bullet chart example\"\n axisComponent={<ChartAxis tickValues={[0, 75, 150]} />}\n comparativeErrorMeasureData={comparativeErrorMeasureData}\n comparativeErrorMeasureLegendData={comparativeErrorMeasureLegendData}\n comparativeWarningMeasureData={comparativeWarningMeasureData}\n comparativeWarningMeasureLegendData={comparativeWarningMeasureLegendData}\n constrainToVisibleArea\n height={200}\n labels={({ datum }) => `${datum.name}: ${datum.y}`}\n legendItemsPerRow={3}\n name=\"chart5\"\n padding={{\n bottom: 50,\n left: 150, // Adjusted to accommodate labels\n right: 50,\n top: 50\n }}\n primarySegmentedMeasureData={primarySegmentedMeasureData}\n primarySegmentedMeasureLegendData={primarySegmentedMeasureLegendData}\n qualitativeRangeData={qualitativeRangeData}\n qualitativeRangeLegendData={qualitativeRangeLegendData}\n themeColor={ChartThemeColor.green}\n subTitle=\"Measure details\"\n title=\"Text label\"\n width={600}\n />\n </div>\n );\n};\n","title":"Error measure and custom axis ticks","lang":"ts","className":""}}>
|
|
675
|
-
|
|
676
|
-
<p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
|
|
677
|
-
{`This is a green bullet chart with error measure and custom axis ticks with 3 legend items per row.`}
|
|
678
|
-
</p>
|
|
679
|
-
</Example>,
|
|
680
|
-
'Primary measure outside range': props =>
|
|
681
|
-
<Example {...pageData} {...props} {...{"code":"import { ChartBullet, ChartThemeColor } from '@patternfly/react-charts/victory';\n\ninterface ChartData {\n name: string;\n y?: number;\n}\n\nexport const ChartBulletOutsideRange: React.FunctionComponent = () => {\n const comparativeWarningMeasureData: ChartData[] = [{ name: 'Warning', y: 80 }];\n const comparativeWarningMeasureLegendData: ChartData[] = [{ name: 'Warning' }];\n const primarySegmentedMeasureData: ChartData[] = [\n { name: 'Measure', y: 75 },\n { name: 'Measure', y: 135 }\n ];\n const primarySegmentedMeasureLegendData: ChartData[] = [{ name: 'Measure 1' }, { name: 'Measure 2' }];\n const qualitativeRangeData: ChartData[] = [\n { name: 'Range', y: 85 },\n { name: 'Range', y: 125 }\n ];\n const qualitativeRangeLegendData: ChartData[] = [{ name: 'Range 1' }, { name: 'Range 2' }];\n\n return (\n <div style={{ height: '200px', width: '600px' }}>\n <ChartBullet\n ariaDesc=\"Storage capacity\"\n ariaTitle=\"Bullet chart example\"\n comparativeWarningMeasureData={comparativeWarningMeasureData}\n comparativeWarningMeasureLegendData={comparativeWarningMeasureLegendData}\n constrainToVisibleArea\n labels={({ datum }) => `${datum.name}: ${datum.y}`}\n height={200}\n maxDomain={{ y: 125 }}\n minDomain={{ y: 50 }}\n name=\"chart6\"\n padding={{\n bottom: 50,\n left: 150, // Adjusted to accommodate labels\n right: 75,\n top: 50\n }}\n primarySegmentedMeasureData={primarySegmentedMeasureData}\n primarySegmentedMeasureLegendData={primarySegmentedMeasureLegendData}\n qualitativeRangeData={qualitativeRangeData}\n qualitativeRangeLegendData={qualitativeRangeLegendData}\n themeColor={ChartThemeColor.yellow}\n subTitle=\"Measure details\"\n title=\"Text label\"\n width={600}\n />\n </div>\n );\n};\n","title":"Primary measure outside range","lang":"ts","className":""}}>
|
|
682
|
-
|
|
683
|
-
<p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
|
|
684
|
-
{`This is a yellow bullet chart with primary measure greater than max range.`}
|
|
685
|
-
</p>
|
|
686
|
-
</Example>,
|
|
687
|
-
'Negative primary measure': props =>
|
|
688
|
-
<Example {...pageData} {...props} {...{"code":"import { ChartBullet } from '@patternfly/react-charts/victory';\n\ninterface ChartData {\n name: string;\n y?: number;\n y0?: number;\n}\n\nexport const ChartBulletNegativeMeasure: React.FunctionComponent = () => {\n const comparativeWarningMeasureData: ChartData[] = [{ name: 'Warning', y: 60 }];\n const comparativeWarningMeasureLegendData: ChartData[] = [{ name: 'Warning' }];\n const primarySegmentedMeasureData: ChartData[] = [{ name: 'Measure', y: -15 }];\n const primarySegmentedMeasureLegendData: ChartData[] = [{ name: 'Measure 1' }];\n const qualitativeRangeData: ChartData[] = [\n { name: 'Range', y: 25, y0: -25 },\n { name: 'Range', y: 50 }\n ];\n const qualitativeRangeLegendData: ChartData[] = [{ name: 'Range 1' }, { name: 'Range 2' }];\n\n return (\n <div style={{ height: '200px', width: '600px' }}>\n <ChartBullet\n ariaDesc=\"Storage capacity\"\n ariaTitle=\"Bullet chart example\"\n comparativeWarningMeasureData={comparativeWarningMeasureData}\n comparativeWarningMeasureLegendData={comparativeWarningMeasureLegendData}\n constrainToVisibleArea\n height={200}\n labels={({ datum }) => `${datum.name}: ${datum.y}`}\n maxDomain={{ y: 75 }}\n minDomain={{ y: -25 }}\n name=\"chart7\"\n padding={{\n bottom: 50,\n left: 150, // Adjusted to accommodate labels\n right: 50,\n top: 65\n }}\n primarySegmentedMeasureData={primarySegmentedMeasureData}\n primarySegmentedMeasureLegendData={primarySegmentedMeasureLegendData}\n qualitativeRangeData={qualitativeRangeData}\n qualitativeRangeLegendData={qualitativeRangeLegendData}\n subTitle=\"Measure details\"\n title=\"Text label\"\n width={600}\n />\n </div>\n );\n};\n","title":"Negative primary measure","lang":"ts","className":""}}>
|
|
689
|
-
|
|
690
|
-
<p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
|
|
691
|
-
{`This bullet chart with negative primary measure is for measures considered to be bad when they are low.`}
|
|
692
|
-
</p>
|
|
693
|
-
</Example>,
|
|
694
|
-
'Reversed with right aligned legend': props =>
|
|
695
|
-
<Example {...pageData} {...props} {...{"code":"import { ChartBullet } from '@patternfly/react-charts/victory';\n\ninterface ChartData {\n name: string;\n y?: number;\n}\n\nexport const ChartBulletReversed: React.FunctionComponent = () => {\n const comparativeWarningMeasureData: ChartData[] = [{ name: 'Warning', y: -88 }];\n const comparativeWarningMeasureLegendData: ChartData[] = [{ name: 'Warning' }];\n const primarySegmentedMeasureData: ChartData[] = [\n { name: 'Measure', y: -60 },\n { name: 'Measure', y: -25 }\n ];\n const primarySegmentedMeasureLegendData: ChartData[] = [{ name: 'Measure 1' }, { name: 'Measure 2' }];\n const qualitativeRangeData: ChartData[] = [\n { name: 'Range', y: -50 },\n { name: 'Range', y: -75 }\n ];\n const qualitativeRangeLegendData: ChartData[] = [{ name: 'Range 1' }, { name: 'Range 2' }];\n\n return (\n <div style={{ height: '200px', width: '700px' }}>\n <ChartBullet\n ariaDesc=\"Storage capacity\"\n ariaTitle=\"Bullet chart example\"\n comparativeWarningMeasureData={comparativeWarningMeasureData}\n comparativeWarningMeasureLegendData={comparativeWarningMeasureLegendData}\n constrainToVisibleArea\n invert\n height={200}\n labels={({ datum }) => `${datum.name}: ${datum.y}`}\n legendPosition=\"right\"\n legendOrientation=\"vertical\"\n maxDomain={{ y: 0 }}\n minDomain={{ y: -100 }}\n name=\"chart8\"\n padding={{\n bottom: 50,\n left: 150, // Adjusted to accommodate labels\n right: 150, // Adjusted to accommodate legend\n top: 80\n }}\n primarySegmentedMeasureData={primarySegmentedMeasureData}\n primarySegmentedMeasureLegendData={primarySegmentedMeasureLegendData}\n qualitativeRangeData={qualitativeRangeData}\n qualitativeRangeLegendData={qualitativeRangeLegendData}\n subTitle=\"Measure details\"\n title=\"Text label\"\n width={700}\n />\n </div>\n );\n};\n","title":"Reversed with right aligned legend","lang":"ts","className":""}}>
|
|
696
|
-
|
|
697
|
-
<p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
|
|
698
|
-
{`This reversed bullet chart with right aligned legend is for measures considered to be good when they are low.`}
|
|
699
|
-
</p>
|
|
700
|
-
</Example>,
|
|
701
|
-
'Negative and positive primary measures': props =>
|
|
702
|
-
<Example {...pageData} {...props} {...{"code":"import { ChartBullet } from '@patternfly/react-charts/victory';\n\ninterface ChartData {\n name: string;\n y?: number;\n y0?: number;\n}\n\nexport const ChartBulletNegativePositiveMeasure: React.FunctionComponent = () => {\n const comparativeWarningMeasureData: ChartData[] = [{ name: 'Warning', y: 60 }];\n const comparativeWarningMeasureLegendData: ChartData[] = [{ name: 'Warning' }];\n const primarySegmentedMeasureData: ChartData[] = [\n { name: 'Measure', y: -10 },\n { name: 'Measure', y: -20 },\n { name: 'Measure', y: 10 },\n { name: 'Measure', y: 40 }\n ];\n const primarySegmentedMeasureLegendData: ChartData[] = [\n { name: 'Measure 1' },\n { name: 'Measure 2' },\n { name: 'Measure 3' },\n { name: 'Measure 4' }\n ];\n const qualitativeRangeData: ChartData[] = [\n { name: 'Range', y: 25, y0: -25 },\n { name: 'Range', y: 50 }\n ];\n const qualitativeRangeLegendData: ChartData[] = [{ name: 'Range 1' }, { name: 'Range 2' }];\n\n return (\n <div style={{ height: '200px', width: '600px' }}>\n <ChartBullet\n ariaDesc=\"Storage capacity\"\n ariaTitle=\"Bullet chart example\"\n comparativeWarningMeasureData={comparativeWarningMeasureData}\n comparativeWarningMeasureLegendData={comparativeWarningMeasureLegendData}\n constrainToVisibleArea\n height={200}\n labels={({ datum }) => `${datum.name}: ${datum.y}`}\n legendItemsPerRow={4}\n maxDomain={{ y: 75 }}\n minDomain={{ y: -25 }}\n name=\"chart9\"\n padding={{\n bottom: 50,\n left: 150, // Adjusted to accommodate labels\n right: 50,\n top: 65\n }}\n primarySegmentedMeasureData={primarySegmentedMeasureData}\n primarySegmentedMeasureLegendData={primarySegmentedMeasureLegendData}\n qualitativeRangeData={qualitativeRangeData}\n qualitativeRangeLegendData={qualitativeRangeLegendData}\n subTitle=\"Measure details\"\n title=\"Text label\"\n width={600}\n />\n </div>\n );\n};\n","title":"Negative and positive primary measures","lang":"ts","className":""}}>
|
|
703
|
-
|
|
704
|
-
<p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
|
|
705
|
-
{`This bullet chart with negative and positive primary measures has 4 legend items per row.`}
|
|
706
|
-
</p>
|
|
707
|
-
</Example>,
|
|
708
|
-
'Vertical with segmented primary measure': props =>
|
|
709
|
-
<Example {...pageData} {...props} {...{"code":"import { ChartBullet } from '@patternfly/react-charts/victory';\n\ninterface ChartData {\n name: string;\n y?: number;\n}\n\nexport const ChartBulletVerticalSegmented: React.FunctionComponent = () => {\n const comparativeWarningMeasureData: ChartData[] = [{ name: 'Warning', y: 88 }];\n const comparativeWarningMeasureLegendData: ChartData[] = [{ name: 'Warning' }];\n const primarySegmentedMeasureData: ChartData[] = [\n { name: 'Measure', y: 25 },\n { name: 'Measure', y: 60 }\n ];\n const primarySegmentedMeasureLegendData: ChartData[] = [{ name: 'Measure 1' }, { name: 'Measure 2' }];\n const qualitativeRangeData: ChartData[] = [\n { name: 'Range', y: 50 },\n { name: 'Range', y: 75 }\n ];\n const qualitativeRangeLegendData: ChartData[] = [{ name: 'Range 1' }, { name: 'Range 2' }];\n\n return (\n <div style={{ height: '500px', width: '500px' }}>\n <ChartBullet\n ariaDesc=\"Storage capacity\"\n ariaTitle=\"Bullet chart example\"\n comparativeWarningMeasureData={comparativeWarningMeasureData}\n comparativeWarningMeasureLegendData={comparativeWarningMeasureLegendData}\n constrainToVisibleArea\n height={500}\n horizontal={false}\n labels={({ datum }) => `${datum.name}: ${datum.y}`}\n maxDomain={{ y: 100 }}\n name=\"chart10\"\n padding={{\n bottom: 125, // Adjusted to accommodate legend\n left: 400,\n right: 50,\n top: 50\n }}\n primarySegmentedMeasureData={primarySegmentedMeasureData}\n primarySegmentedMeasureLegendData={primarySegmentedMeasureLegendData}\n qualitativeRangeData={qualitativeRangeData}\n qualitativeRangeLegendData={qualitativeRangeLegendData}\n subTitle=\"Measure details\"\n title=\"Text label\"\n width={500}\n />\n </div>\n );\n};\n","title":"Vertical with segmented primary measure","lang":"ts","className":""}}>
|
|
710
|
-
|
|
711
|
-
</Example>,
|
|
712
|
-
'Vertical primary measure outside max range': props =>
|
|
713
|
-
<Example {...pageData} {...props} {...{"code":"import { ChartBullet, ChartThemeColor } from '@patternfly/react-charts/victory';\n\ninterface ChartData {\n name: string;\n y?: number;\n}\n\nexport const ChartBulletVerticalMaxRange: React.FunctionComponent = () => {\n const comparativeWarningMeasureData: ChartData[] = [{ name: 'Warning', y: 100 }];\n const comparativeWarningMeasureLegendData: ChartData[] = [{ name: 'Warning' }];\n const primarySegmentedMeasureData: ChartData[] = [\n { name: 'Measure', y: 75 },\n { name: 'Measure', y: 135 }\n ];\n const primarySegmentedMeasureLegendData: ChartData[] = [{ name: 'Measure 1' }, { name: 'Measure 2' }];\n const qualitativeRangeData: ChartData[] = [\n { name: 'Range', y: 85 },\n { name: 'Range', y: 125 }\n ];\n const qualitativeRangeLegendData: ChartData[] = [{ name: 'Range 1' }, { name: 'Range 2' }];\n\n return (\n <div style={{ height: '500px', width: '500px' }}>\n <ChartBullet\n ariaDesc=\"Storage capacity\"\n ariaTitle=\"Bullet chart example\"\n comparativeWarningMeasureData={comparativeWarningMeasureData}\n comparativeWarningMeasureLegendData={comparativeWarningMeasureLegendData}\n constrainToVisibleArea\n height={500}\n horizontal={false}\n labels={({ datum }) => `${datum.name}: ${datum.y}`}\n maxDomain={{ y: 125 }}\n minDomain={{ y: 50 }}\n name=\"chart11\"\n padding={{\n bottom: 125, // Adjusted to accommodate legend\n left: 400,\n right: 50,\n top: 50 // Adjusted to accommodate primary segmented measure tooltip\n }}\n primarySegmentedMeasureData={primarySegmentedMeasureData}\n primarySegmentedMeasureLegendData={primarySegmentedMeasureLegendData}\n qualitativeRangeData={qualitativeRangeData}\n qualitativeRangeLegendData={qualitativeRangeLegendData}\n subTitle=\"Measure details\"\n title=\"Text label\"\n themeColor={ChartThemeColor.yellow}\n width={500}\n />\n </div>\n );\n};\n","title":"Vertical primary measure outside max range","lang":"ts","className":""}}>
|
|
714
|
-
|
|
715
|
-
</Example>,
|
|
716
|
-
'Custom labels': props =>
|
|
717
|
-
<Example {...pageData} {...props} {...{"code":"import { ChartAxis, ChartBullet } from '@patternfly/react-charts/victory';\n\ninterface ChartData {\n name: string;\n y?: number;\n}\n\nexport const ChartBulletCustomLabels: React.FunctionComponent = () => {\n const comparativeWarningMeasureData: ChartData[] = [{ name: 'Warning', y: 88 }];\n const primarySegmentedMeasureData: ChartData[] = [{ name: 'Measure', y: 60 }];\n const qualitativeRangeData: ChartData[] = [\n { name: 'Range', y: 50 },\n { name: 'Range', y: 75 }\n ];\n\n return (\n <div style={{ height: '150px', width: '600px' }}>\n <ChartBullet\n ariaDesc=\"Storage capacity\"\n ariaTitle=\"Bullet chart example\"\n axisComponent={\n <ChartAxis\n tickValues={[0, 25, 50, 75, 100]}\n tickFormat={(val) => {\n switch (val) {\n case 0:\n return 'New';\n case 25:\n return 'Beginner';\n case 50:\n return 'Intermediate';\n case 75:\n return 'Advanced';\n case 100:\n return 'Expert';\n }\n }}\n />\n }\n comparativeWarningMeasureData={comparativeWarningMeasureData}\n constrainToVisibleArea\n height={150}\n labels={({ datum }) => `${datum.name}: ${datum.y}`}\n maxDomain={{ y: 100 }}\n name=\"chart12\"\n primarySegmentedMeasureData={primarySegmentedMeasureData}\n qualitativeRangeData={qualitativeRangeData}\n width={600}\n />\n </div>\n );\n};\n","title":"Custom labels","lang":"ts","className":""}}>
|
|
718
|
-
|
|
719
|
-
</Example>,
|
|
720
|
-
'Custom size': props =>
|
|
721
|
-
<Example {...pageData} {...props} {...{"code":"import { ChartBullet } from '@patternfly/react-charts/victory';\n\ninterface ChartData {\n name: string;\n y?: number;\n}\n\nexport const ChartBulletCustomSize: React.FunctionComponent = () => {\n const comparativeWarningMeasureData: ChartData[] = [{ name: 'Warning', y: 88 }];\n const comparativeWarningMeasureLegendData: ChartData[] = [{ name: 'Warning' }];\n const primarySegmentedMeasureData: ChartData[] = [{ name: 'Measure', y: 60 }];\n const primarySegmentedMeasureLegendData: ChartData[] = [{ name: 'Measure 1' }];\n const qualitativeRangeData: ChartData[] = [\n { name: 'Range', y: 50 },\n { name: 'Range', y: 75 }\n ];\n const qualitativeRangeLegendData: ChartData[] = [{ name: 'Range 1' }, { name: 'Range 2' }];\n\n return (\n <div style={{ height: '200px', width: '600px' }}>\n <ChartBullet\n ariaDesc=\"Storage capacity\"\n ariaTitle=\"Bullet chart example\"\n bulletSize={160}\n comparativeWarningMeasureData={comparativeWarningMeasureData}\n comparativeWarningMeasureLegendData={comparativeWarningMeasureLegendData}\n height={200}\n labels={({ datum }) => `${datum.name}: ${datum.y}`}\n maxDomain={{ y: 100 }}\n name=\"chart13\"\n padding={{\n bottom: 50,\n left: 150, // Adjusted to accommodate labels\n right: 50,\n top: 50\n }}\n primarySegmentedMeasureData={primarySegmentedMeasureData}\n primarySegmentedMeasureLegendData={primarySegmentedMeasureLegendData}\n qualitativeRangeData={qualitativeRangeData}\n qualitativeRangeLegendData={qualitativeRangeLegendData}\n subTitle=\"Measure details\"\n title=\"Text label\"\n width={600}\n />\n </div>\n );\n};\n","title":"Custom size","lang":"ts","className":""}}>
|
|
722
|
-
|
|
723
|
-
</Example>,
|
|
724
|
-
'Horizontal group': props =>
|
|
725
|
-
<Example {...pageData} {...props} {...{"code":"import { ChartBullet, ChartContainer } from '@patternfly/react-charts/victory';\n\ninterface ChartData {\n name: string;\n y?: number;\n}\n\nexport const ChartBulletHorizontalGroup: React.FunctionComponent = () => {\n const comparativeWarningMeasureData: ChartData[] = [{ name: 'Warning', y: 78 }];\n const primarySegmentedMeasureData: ChartData[] = [\n { name: 'Measure', y: 15 },\n { name: 'Measure', y: 50 }\n ];\n const qualitativeRangeData: ChartData[] = [\n { name: 'Range', y: 40 },\n { name: 'Range', y: 65 }\n ];\n\n return (\n <div style={{ height: '500px', width: '600px' }}>\n <ChartContainer title=\"Bullet chart example\" height={500} width={600}>\n <ChartBullet\n comparativeWarningMeasureData={comparativeWarningMeasureData}\n constrainToVisibleArea\n height={500}\n labels={({ datum }) => `${datum.name}: ${datum.y}`}\n maxDomain={{ y: 100 }}\n name=\"chart14\"\n padding={{\n bottom: 100, // Adjusted to accommodate legend\n left: 150, // Adjusted to accommodate labels\n right: 50,\n top: 75\n }}\n primarySegmentedMeasureData={primarySegmentedMeasureData}\n qualitativeRangeData={qualitativeRangeData}\n standalone={false}\n subTitle=\"Measure details\"\n title=\"Text label\"\n width={600}\n />\n <ChartBullet\n comparativeWarningMeasureData={[{ name: 'Warning', y: 88 }]}\n constrainToVisibleArea\n height={500}\n labels={({ datum }) => `${datum.name}: ${datum.y}`}\n maxDomain={{ y: 100 }}\n name=\"chart15\"\n padding={{\n bottom: 100, // Adjusted to accommodate legend\n left: 150, // Adjusted to accommodate labels\n right: 50,\n top: 300\n }}\n primarySegmentedMeasureData={[\n { name: 'Measure', y: 25 },\n { name: 'Measure', y: 60 }\n ]}\n qualitativeRangeData={[\n { name: 'Range', y: 50 },\n { name: 'Range', y: 75 }\n ]}\n standalone={false}\n subTitle=\"Measure details\"\n title=\"Text label\"\n width={600}\n />\n <ChartBullet\n comparativeWarningMeasureData={[{ name: 'Warning', y: 98 }]}\n constrainToVisibleArea\n height={500}\n labels={({ datum }) => `${datum.name}: ${datum.y}`}\n maxDomain={{ y: 100 }}\n name=\"chart16\"\n padding={{\n bottom: 100, // Adjusted to accommodate legend\n left: 150, // Adjusted to accommodate labels\n right: 50,\n top: 525\n }}\n primarySegmentedMeasureData={[\n { name: 'Measure', y: 35 },\n { name: 'Measure', y: 70 }\n ]}\n qualitativeRangeData={[\n { name: 'Range', y: 60 },\n { name: 'Range', y: 85 }\n ]}\n standalone={false}\n subTitle=\"Measure details\"\n title=\"Text label\"\n width={600}\n />\n <ChartBullet\n comparativeWarningMeasureData={comparativeWarningMeasureData}\n comparativeWarningMeasureLegendData={[{ name: 'Warning' }]}\n constrainToVisibleArea\n height={500}\n labels={({ datum }) => `${datum.name}: ${datum.y}`}\n maxDomain={{ y: 100 }}\n name=\"chart17\"\n padding={{\n bottom: 100, // Adjusted to accommodate legend\n left: 150, // Adjusted to accommodate labels\n right: 50,\n top: 750\n }}\n primarySegmentedMeasureData={primarySegmentedMeasureData}\n primarySegmentedMeasureLegendData={[{ name: 'Measure 1' }, { name: 'Measure 2' }]}\n qualitativeRangeData={qualitativeRangeData}\n qualitativeRangeLegendData={[{ name: 'Range 1' }, { name: 'Range 2' }]}\n standalone={false}\n subTitle=\"Measure details\"\n title=\"Text label\"\n width={600}\n />\n </ChartContainer>\n </div>\n );\n};\n","title":"Horizontal group","lang":"ts","className":""}}>
|
|
726
|
-
|
|
727
|
-
</Example>,
|
|
728
|
-
'Vertical group': props =>
|
|
729
|
-
<Example {...pageData} {...props} {...{"code":"import { ChartBullet, ChartContainer } from '@patternfly/react-charts/victory';\n\ninterface ChartData {\n name: string;\n y?: number;\n}\n\nexport const ChartBulletVerticalGroup: React.FunctionComponent = () => {\n const comparativeWarningMeasureData: ChartData[] = [{ name: 'Warning', y: 78 }];\n const primarySegmentedMeasureData: ChartData[] = [\n { name: 'Measure', y: 15 },\n { name: 'Measure', y: 50 }\n ];\n const qualitativeRangeData: ChartData[] = [\n { name: 'Range', y: 40 },\n { name: 'Range', y: 65 }\n ];\n\n return (\n <div style={{ height: '600px', width: '500px' }}>\n <ChartContainer title=\"Bullet chart example\" height={600} width={500}>\n <ChartBullet\n comparativeWarningMeasureData={comparativeWarningMeasureData}\n comparativeWarningMeasureLegendData={[{ name: 'Warning' }]}\n constrainToVisibleArea\n height={600}\n horizontal={false}\n labels={({ datum }) => `${datum.name}: ${datum.y}`}\n maxDomain={{ y: 100 }}\n name=\"chart18\"\n padding={{\n bottom: 125, // Adjusted to accommodate legend\n left: 50,\n right: 50,\n top: 50\n }}\n primarySegmentedMeasureData={primarySegmentedMeasureData}\n primarySegmentedMeasureLegendData={[{ name: 'Measure 1' }, { name: 'Measure 2' }]}\n qualitativeRangeData={qualitativeRangeData}\n qualitativeRangeLegendData={[{ name: 'Range 1' }, { name: 'Range 2' }]}\n standalone={false}\n subTitle=\"Measure details\"\n title=\"Text label\"\n width={500}\n />\n <ChartBullet\n comparativeWarningMeasureData={[{ name: 'Warning', y: 88 }]}\n constrainToVisibleArea\n height={600}\n horizontal={false}\n labels={({ datum }) => `${datum.name}: ${datum.y}`}\n maxDomain={{ y: 100 }}\n name=\"chart19\"\n padding={{\n bottom: 125, // Adjusted to accommodate legend\n left: 300,\n right: 50,\n top: 50\n }}\n primarySegmentedMeasureData={[\n { name: 'Measure', y: 25 },\n { name: 'Measure', y: 60 }\n ]}\n qualitativeRangeData={[\n { name: 'Range', y: 50 },\n { name: 'Range', y: 75 }\n ]}\n standalone={false}\n subTitle=\"Measure details\"\n title=\"Text label\"\n width={500}\n />\n <ChartBullet\n comparativeWarningMeasureData={[{ name: 'Warning', y: 98 }]}\n constrainToVisibleArea\n height={600}\n horizontal={false}\n labels={({ datum }) => `${datum.name}: ${datum.y}`}\n maxDomain={{ y: 100 }}\n name=\"chart20\"\n padding={{\n bottom: 125, // Adjusted to accommodate legend\n left: 550,\n right: 50,\n top: 50\n }}\n primarySegmentedMeasureData={[\n { name: 'Measure', y: 35 },\n { name: 'Measure', y: 70 }\n ]}\n qualitativeRangeData={[\n { name: 'Range', y: 60 },\n { name: 'Range', y: 85 }\n ]}\n standalone={false}\n subTitle=\"Measure details\"\n title=\"Text label\"\n width={500}\n />\n <ChartBullet\n comparativeWarningMeasureData={comparativeWarningMeasureData}\n constrainToVisibleArea\n height={600}\n horizontal={false}\n labels={({ datum }) => `${datum.name}: ${datum.y}`}\n maxDomain={{ y: 100 }}\n name=\"chart21\"\n padding={{\n bottom: 125, // Adjusted to accommodate legend\n left: 800,\n right: 50,\n top: 50\n }}\n primarySegmentedMeasureData={primarySegmentedMeasureData}\n qualitativeRangeData={qualitativeRangeData}\n standalone={false}\n subTitle=\"Measure details\"\n title=\"Text label\"\n width={500}\n />\n </ChartContainer>\n </div>\n );\n};\n","title":"Vertical group","lang":"ts","className":""}}>
|
|
730
|
-
|
|
731
|
-
</Example>,
|
|
732
|
-
'Horizontal group with title': props =>
|
|
733
|
-
<Example {...pageData} {...props} {...{"code":"import { ChartBullet, ChartContainer } from '@patternfly/react-charts/victory';\n\ninterface ChartData {\n name: string;\n y?: number;\n}\n\nexport const ChartBulletHorizontalGroupTitle: React.FunctionComponent = () => {\n const comparativeWarningMeasureData: ChartData[] = [{ name: 'Warning', y: 78 }];\n const primarySegmentedMeasureData: ChartData[] = [\n { name: 'Measure', y: 15 },\n { name: 'Measure', y: 50 }\n ];\n const qualitativeRangeData: ChartData[] = [\n { name: 'Range', y: 40 },\n { name: 'Range', y: 65 }\n ];\n\n return (\n <div style={{ height: '600px', width: '600px' }}>\n <ChartContainer title=\"Bullet chart example\" height={600} width={600}>\n <ChartBullet\n comparativeWarningMeasureData={comparativeWarningMeasureData}\n constrainToVisibleArea\n groupSubTitle=\"Measure details\"\n groupTitle=\"Text label\"\n height={575}\n labels={({ datum }) => `${datum.name}: ${datum.y}`}\n maxDomain={{ y: 100 }}\n name=\"chart22\"\n padding={{\n bottom: 100, // Adjusted to accommodate legend\n left: 150, // Adjusted to accommodate labels\n right: 50,\n top: 275 // Adjusted to accommodate group labels\n }}\n primarySegmentedMeasureData={primarySegmentedMeasureData}\n qualitativeRangeData={qualitativeRangeData}\n standalone={false}\n subTitle=\"Measure details\"\n title=\"Text label\"\n width={600}\n />\n <ChartBullet\n comparativeWarningMeasureData={[{ name: 'Warning', y: 88 }]}\n constrainToVisibleArea\n height={600}\n labels={({ datum }) => `${datum.name}: ${datum.y}`}\n maxDomain={{ y: 100 }}\n name=\"chart23\"\n padding={{\n bottom: 100, // Adjusted to accommodate legend\n left: 150, // Adjusted to accommodate labels\n right: 50,\n top: 500 // Adjusted to accommodate group labels\n }}\n primarySegmentedMeasureData={[\n { name: 'Measure', y: 25 },\n { name: 'Measure', y: 60 }\n ]}\n qualitativeRangeData={[\n { name: 'Range', y: 50 },\n { name: 'Range', y: 75 }\n ]}\n standalone={false}\n subTitle=\"Measure details\"\n title=\"Text label\"\n width={600}\n />\n <ChartBullet\n comparativeWarningMeasureData={[{ name: 'Warning', y: 98 }]}\n constrainToVisibleArea\n height={600}\n labels={({ datum }) => `${datum.name}: ${datum.y}`}\n maxDomain={{ y: 100 }}\n name=\"chart24\"\n padding={{\n bottom: 100, // Adjusted to accommodate legend\n left: 150, // Adjusted to accommodate labels\n right: 50,\n top: 725 // Adjusted to accommodate group labels\n }}\n primarySegmentedMeasureData={[\n { name: 'Measure', y: 35 },\n { name: 'Measure', y: 70 }\n ]}\n qualitativeRangeData={[\n { name: 'Range', y: 60 },\n { name: 'Range', y: 85 }\n ]}\n standalone={false}\n subTitle=\"Measure details\"\n title=\"Text label\"\n width={600}\n />\n <ChartBullet\n comparativeWarningMeasureData={comparativeWarningMeasureData}\n comparativeWarningMeasureLegendData={[{ name: 'Warning' }]}\n constrainToVisibleArea\n height={600}\n labels={({ datum }) => `${datum.name}: ${datum.y}`}\n maxDomain={{ y: 100 }}\n name=\"chart25\"\n padding={{\n bottom: 100, // Adjusted to accommodate legend\n left: 150, // Adjusted to accommodate labels\n right: 50,\n top: 950 // Adjusted to accommodate group labels\n }}\n primarySegmentedMeasureData={primarySegmentedMeasureData}\n primarySegmentedMeasureLegendData={[{ name: 'Measure 1' }, { name: 'Measure 2' }]}\n qualitativeRangeData={qualitativeRangeData}\n qualitativeRangeLegendData={[{ name: 'Range 1' }, { name: 'Range 2' }]}\n standalone={false}\n subTitle=\"Measure details\"\n title=\"Text label\"\n width={600}\n />\n </ChartContainer>\n </div>\n );\n};\n","title":"Horizontal group with title","lang":"ts","className":""}}>
|
|
734
|
-
|
|
735
|
-
</Example>,
|
|
736
|
-
'Vertical group with title': props =>
|
|
737
|
-
<Example {...pageData} {...props} {...{"code":"import { ChartBullet, ChartContainer } from '@patternfly/react-charts/victory';\n\ninterface ChartData {\n name: string;\n y?: number;\n}\n\nexport const ChartBulletVerticalGroupTitle: React.FunctionComponent = () => {\n const comparativeWarningMeasureData: ChartData[] = [{ name: 'Warning', y: 78 }];\n const primarySegmentedMeasureData: ChartData[] = [\n { name: 'Measure', y: 15 },\n { name: 'Measure', y: 50 }\n ];\n const qualitativeRangeData: ChartData[] = [\n { name: 'Range', y: 40 },\n { name: 'Range', y: 65 }\n ];\n\n return (\n <div style={{ height: '600px', width: '500px' }}>\n <ChartContainer title=\"Bullet chart example\" height={600} width={500}>\n <ChartBullet\n comparativeWarningMeasureData={comparativeWarningMeasureData}\n comparativeWarningMeasureLegendData={[{ name: 'Warning' }]}\n constrainToVisibleArea\n groupSubTitle=\"Measure details\"\n groupTitle=\"Text label\"\n height={600}\n horizontal={false}\n labels={({ datum }) => `${datum.name}: ${datum.y}`}\n maxDomain={{ y: 100 }}\n name=\"chart26\"\n padding={{\n bottom: 125, // Adjusted to accommodate legend\n left: 50,\n right: 50,\n top: 150 // Adjusted to accommodate group labels\n }}\n primarySegmentedMeasureData={primarySegmentedMeasureData}\n primarySegmentedMeasureLegendData={[{ name: 'Measure 1' }, { name: 'Measure 2' }]}\n qualitativeRangeData={qualitativeRangeData}\n qualitativeRangeLegendData={[{ name: 'Range 1' }, { name: 'Range 2' }]}\n standalone={false}\n subTitle=\"Measure details\"\n title=\"Text label\"\n width={500}\n />\n <ChartBullet\n comparativeWarningMeasureData={[{ name: 'Warning', y: 88 }]}\n constrainToVisibleArea\n height={600}\n horizontal={false}\n labels={({ datum }) => `${datum.name}: ${datum.y}`}\n maxDomain={{ y: 100 }}\n name=\"chart27\"\n padding={{\n bottom: 125, // Adjusted to accommodate legend\n left: 300,\n right: 50,\n top: 150 // Adjusted to accommodate group labels\n }}\n primarySegmentedMeasureData={[\n { name: 'Measure', y: 25 },\n { name: 'Measure', y: 60 }\n ]}\n qualitativeRangeData={[\n { name: 'Range', y: 50 },\n { name: 'Range', y: 75 }\n ]}\n standalone={false}\n subTitle=\"Measure details\"\n title=\"Text label\"\n width={500}\n />\n <ChartBullet\n comparativeWarningMeasureData={[{ name: 'Warning', y: 98 }]}\n constrainToVisibleArea\n height={600}\n horizontal={false}\n labels={({ datum }) => `${datum.name}: ${datum.y}`}\n maxDomain={{ y: 100 }}\n name=\"chart28\"\n padding={{\n bottom: 125, // Adjusted to accommodate legend\n left: 550,\n right: 50,\n top: 150 // Adjusted to accommodate group labels\n }}\n primarySegmentedMeasureData={[\n { name: 'Measure', y: 35 },\n { name: 'Measure', y: 70 }\n ]}\n qualitativeRangeData={[\n { name: 'Range', y: 60 },\n { name: 'Range', y: 85 }\n ]}\n standalone={false}\n subTitle=\"Measure details\"\n title=\"Text label\"\n width={500}\n />\n <ChartBullet\n comparativeWarningMeasureData={comparativeWarningMeasureData}\n constrainToVisibleArea\n height={600}\n horizontal={false}\n labels={({ datum }) => `${datum.name}: ${datum.y}`}\n maxDomain={{ y: 100 }}\n name=\"chart29\"\n padding={{\n bottom: 125, // Adjusted to accommodate legend\n left: 800,\n right: 50,\n top: 150 // Adjusted to accommodate group labels\n }}\n primarySegmentedMeasureData={primarySegmentedMeasureData}\n qualitativeRangeData={qualitativeRangeData}\n standalone={false}\n subTitle=\"Measure details\"\n title=\"Text label\"\n width={500}\n />\n </ChartContainer>\n </div>\n );\n};\n","title":"Vertical group with title","lang":"ts","className":""}}>
|
|
738
|
-
|
|
739
|
-
</Example>
|
|
740
|
-
};
|
|
741
|
-
|
|
742
|
-
const Component = () => (
|
|
743
|
-
<React.Fragment>
|
|
744
|
-
<AutoLinkHeader {...{"id":"introduction","headingLevel":"h2","className":"ws-title ws-h2"}}>
|
|
745
|
-
{`Introduction`}
|
|
746
|
-
</AutoLinkHeader>
|
|
747
|
-
<p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
|
|
748
|
-
{`Note: PatternFly React charts live in its own package at `}
|
|
749
|
-
<PatternflyThemeLink {...{"to":"https://www.npmjs.com/package/@patternfly/react-charts","className":""}}>
|
|
750
|
-
{`@patternfly/react-charts`}
|
|
751
|
-
</PatternflyThemeLink>
|
|
752
|
-
{`!`}
|
|
753
|
-
</p>
|
|
754
|
-
<p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
|
|
755
|
-
{`The examples below are based on the `}
|
|
756
|
-
<PatternflyThemeLink {...{"to":"https://formidable.com/open-source/victory/docs/victory-chart/","className":""}}>
|
|
757
|
-
{`Victory`}
|
|
758
|
-
</PatternflyThemeLink>
|
|
759
|
-
{` 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.`}
|
|
760
|
-
</p>
|
|
761
|
-
<AutoLinkHeader {...{"id":"examples","headingLevel":"h2","className":"ws-title ws-h2"}}>
|
|
762
|
-
{`Examples`}
|
|
763
|
-
</AutoLinkHeader>
|
|
764
|
-
{React.createElement(pageData.examples["Basic"])}
|
|
765
|
-
{React.createElement(pageData.examples["Segmented primary measure"])}
|
|
766
|
-
{React.createElement(pageData.examples["Responsive container with bottom aligned legend"])}
|
|
767
|
-
{React.createElement(pageData.examples["Primary measure dot"])}
|
|
768
|
-
{React.createElement(pageData.examples["Error measure and custom axis ticks"])}
|
|
769
|
-
{React.createElement(pageData.examples["Primary measure outside range"])}
|
|
770
|
-
{React.createElement(pageData.examples["Negative primary measure"])}
|
|
771
|
-
{React.createElement(pageData.examples["Reversed with right aligned legend"])}
|
|
772
|
-
{React.createElement(pageData.examples["Negative and positive primary measures"])}
|
|
773
|
-
{React.createElement(pageData.examples["Vertical with segmented primary measure"])}
|
|
774
|
-
{React.createElement(pageData.examples["Vertical primary measure outside max range"])}
|
|
775
|
-
{React.createElement(pageData.examples["Custom labels"])}
|
|
776
|
-
{React.createElement(pageData.examples["Custom size"])}
|
|
777
|
-
{React.createElement(pageData.examples["Horizontal group"])}
|
|
778
|
-
{React.createElement(pageData.examples["Vertical group"])}
|
|
779
|
-
{React.createElement(pageData.examples["Horizontal group with title"])}
|
|
780
|
-
{React.createElement(pageData.examples["Vertical group with title"])}
|
|
781
|
-
<AutoLinkHeader {...{"id":"documentation","headingLevel":"h2","className":"ws-title ws-h2"}}>
|
|
782
|
-
{`Documentation`}
|
|
783
|
-
</AutoLinkHeader>
|
|
784
|
-
<AutoLinkHeader {...{"id":"tips","headingLevel":"h3","className":"ws-title ws-h3"}}>
|
|
785
|
-
{`Tips`}
|
|
786
|
-
</AutoLinkHeader>
|
|
787
|
-
<ul {...{"className":"pf-v6-c-content--ul pf-m-editorial ws-ul "}}>
|
|
788
|
-
<li {...{"className":"pf-v6-c-content--li pf-m-editorial ws-li "}}>
|
|
789
|
-
{`See Victory's `}
|
|
790
|
-
<PatternflyThemeLink {...{"to":"https://formidable.com/open-source/victory/docs/faq","className":""}}>
|
|
791
|
-
{`FAQ`}
|
|
792
|
-
</PatternflyThemeLink>
|
|
793
|
-
</li>
|
|
794
|
-
<li {...{"className":"pf-v6-c-content--li pf-m-editorial ws-li "}}>
|
|
795
|
-
<code {...{"className":"ws-code "}}>
|
|
796
|
-
{`ChartLegend`}
|
|
797
|
-
</code>
|
|
798
|
-
{` may be used as a standalone component, instead of using `}
|
|
799
|
-
<code {...{"className":"ws-code "}}>
|
|
800
|
-
{`legendData`}
|
|
801
|
-
</code>
|
|
802
|
-
</li>
|
|
803
|
-
</ul>
|
|
804
|
-
<AutoLinkHeader {...{"id":"note","headingLevel":"h3","className":"ws-title ws-h3"}}>
|
|
805
|
-
{`Note`}
|
|
806
|
-
</AutoLinkHeader>
|
|
807
|
-
<p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
|
|
808
|
-
{`Currently, the generated documentation below is not able to resolve type definitions from Victory imports. For the
|
|
809
|
-
components used in the examples above, Victory pass-thru props are also documented here:`}
|
|
810
|
-
</p>
|
|
811
|
-
<ul {...{"className":"pf-v6-c-content--ul pf-m-editorial ws-ul "}}>
|
|
812
|
-
<li {...{"className":"pf-v6-c-content--li pf-m-editorial ws-li "}}>
|
|
813
|
-
{`For `}
|
|
814
|
-
<code {...{"className":"ws-code "}}>
|
|
815
|
-
{`ChartAxis`}
|
|
816
|
-
</code>
|
|
817
|
-
{` props, see `}
|
|
818
|
-
<PatternflyThemeLink {...{"to":"https://formidable.com/open-source/victory/docs/victory-axis","className":""}}>
|
|
819
|
-
{`VictoryAxis`}
|
|
820
|
-
</PatternflyThemeLink>
|
|
821
|
-
</li>
|
|
822
|
-
<li {...{"className":"pf-v6-c-content--li pf-m-editorial ws-li "}}>
|
|
823
|
-
{`For `}
|
|
824
|
-
<code {...{"className":"ws-code "}}>
|
|
825
|
-
{`ChartBullet`}
|
|
826
|
-
</code>
|
|
827
|
-
{` props, see `}
|
|
828
|
-
<PatternflyThemeLink {...{"to":"https://formidable.com/open-source/victory/docs/victory-bar","className":""}}>
|
|
829
|
-
{`VictoryBar`}
|
|
830
|
-
</PatternflyThemeLink>
|
|
831
|
-
</li>
|
|
832
|
-
<li {...{"className":"pf-v6-c-content--li pf-m-editorial ws-li "}}>
|
|
833
|
-
{`For `}
|
|
834
|
-
<code {...{"className":"ws-code "}}>
|
|
835
|
-
{`ChartContainer`}
|
|
836
|
-
</code>
|
|
837
|
-
{` props, see `}
|
|
838
|
-
<PatternflyThemeLink {...{"to":"https://formidable.com/open-source/victory/docs/victory-container","className":""}}>
|
|
839
|
-
{`VictoryContainer`}
|
|
840
|
-
</PatternflyThemeLink>
|
|
841
|
-
</li>
|
|
842
|
-
</ul>
|
|
843
|
-
</React.Fragment>
|
|
844
|
-
);
|
|
845
|
-
Component.displayName = 'ComponentsChartsBulletChart-VictoryDocs';
|
|
846
|
-
Component.pageData = pageData;
|
|
847
|
-
|
|
848
|
-
export default Component;
|