Skip to content

Commit

Permalink
fix(charts) - update CodeSandbox examples
Browse files Browse the repository at this point in the history
  • Loading branch information
dlabrecq committed Jan 22, 2025
1 parent 640b9eb commit 96b03ba
Show file tree
Hide file tree
Showing 7 changed files with 226 additions and 226 deletions.
12 changes: 6 additions & 6 deletions packages/react-charts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"victory-area": "^37.3.6",
"victory-axis": "^37.3.6",
"victory-bar": "^37.3.6",
"victory-box-plot": "^37.3.5",
"victory-box-plot": "^37.3.6",
"victory-chart": "^37.3.6",
"victory-core": "^37.3.6",
"victory-create-container": "^37.3.6",
Expand All @@ -57,11 +57,11 @@
"victory-legend": "^37.3.6",
"victory-line": "^37.3.6",
"victory-pie": "^37.3.6",
"victory-scatter": "^37.3.4",
"victory-stack": "^37.3.4",
"victory-tooltip": "^37.3.4",
"victory-voronoi-container": "^37.3.4",
"victory-zoom-container": "^37.3.4"
"victory-scatter": "^37.3.6",
"victory-stack": "^37.3.6",
"victory-tooltip": "^37.3.6",
"victory-voronoi-container": "^37.3.6",
"victory-zoom-container": "^37.3.6"
},
"peerDependenciesMeta": {
"victory-area": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ PatternFly React charts are based on the [Victory](https://formidable.com/open-s
### Basic with right aligned legend
```js
import React from 'react';
import { Chart, ChartAxis, ChartBoxPlot } from '@patternfly/react-charts/victory';
import { Chart, ChartAxis, ChartBoxPlot, ChartThemeColor } from '@patternfly/react-charts/victory';

<div style={{ height: '300px', width: '750px' }}>
<Chart
Expand Down Expand Up @@ -68,7 +68,7 @@ This demonstrates how to display labels.

```js
import React from 'react';
import { Chart, ChartAxis, ChartBoxPlot } from '@patternfly/react-charts/victory';
import { Chart, ChartAxis, ChartBoxPlot, ChartThemeColor } from '@patternfly/react-charts/victory';

<div style={{ height: '300px', width: '600px' }}>
<Chart
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ This is a green bullet chart with error measure and custom axis ticks with 3 leg

```js
import React from 'react';
import { ChartAxis, ChartBullet } from '@patternfly/react-charts/victory';
import { ChartAxis, ChartBullet, ChartThemeColor } from '@patternfly/react-charts/victory';

<div style={{ height: '200px', width: '600px' }}>
<ChartBullet
Expand Down Expand Up @@ -233,7 +233,7 @@ This is a yellow bullet chart with primary measure greater than max range.

```js
import React from 'react';
import { ChartBullet } from '@patternfly/react-charts/victory';
import { ChartBullet, ChartThemeColor } from '@patternfly/react-charts/victory';

<div style={{ height: '200px', width: '600px' }}>
<ChartBullet
Expand Down Expand Up @@ -417,7 +417,7 @@ import { ChartBullet } from '@patternfly/react-charts/victory';
### Vertical primary measure outside max range
```js
import React from 'react';
import { ChartBullet } from '@patternfly/react-charts/victory';
import { ChartBullet, ChartThemeColor } from '@patternfly/react-charts/victory';

<div style={{ height: '500px', width: '500px' }}>
<ChartBullet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ This demonstrates how to apply theme colors for unordered charts like area, line

```js
import React from 'react';
import { Chart, ChartArea, ChartAxis, ChartGroup, ChartVoronoiContainer } from '@patternfly/react-charts/victory';
import { Chart, ChartArea, ChartAxis, ChartGroup, ChartThemeColor, ChartVoronoiContainer } from '@patternfly/react-charts/victory';

<div style={{ height: '200px', width: '800px' }}>
<Chart
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ PatternFly React charts are based on the [Victory](https://formidable.com/open-s
### Area chart
```js
import React from 'react';
import { Chart, ChartArea, ChartAxis, ChartGroup, ChartVoronoiContainer } from '@patternfly/react-charts/victory';
import { Chart, ChartArea, ChartAxis, ChartGroup, ChartThemeColor, ChartVoronoiContainer } from '@patternfly/react-charts/victory';
import { Switch } from '@patternfly/react-core';

export const ChartAreaSkeleton: React.FunctionComponent = () => {
Expand Down Expand Up @@ -119,7 +119,7 @@ export const ChartAreaSkeleton: React.FunctionComponent = () => {
```js
import React from 'react';
import { Switch } from '@patternfly/react-core';
import { Chart, ChartBar, ChartAxis, ChartGroup, ChartVoronoiContainer } from '@patternfly/react-charts/victory';
import { Chart, ChartBar, ChartAxis, ChartGroup, ChartThemeColor, ChartVoronoiContainer } from '@patternfly/react-charts/victory';

export const ChartBarSkeleton: React.FunctionComponent = () => {
const [isChecked, setIsChecked] = React.useState<boolean>(true);
Expand Down Expand Up @@ -175,8 +175,8 @@ export const ChartBarSkeleton: React.FunctionComponent = () => {
### Box plot chart
```js
import React from 'react';
import { Switch } from '@patternfly/react-charts/victory'
import { Chart, ChartAxis, ChartBoxPlot } from '@patternfly/react-charts/victory';
import { Switch } from '@patternfly/react-core'
import { Chart, ChartAxis, ChartBoxPlot, ChartThemeColor } from '@patternfly/react-charts/victory';

export const ChartBoxPlotSkeleton: React.FunctionComponent = () => {
const [isChecked, setIsChecked] = React.useState<boolean>(true);
Expand Down Expand Up @@ -234,7 +234,7 @@ export const ChartBoxPlotSkeleton: React.FunctionComponent = () => {
```js
import React from 'react';
import { Switch } from '@patternfly/react-core';
import { Chart, ChartAxis, ChartBullet, ChartLegend } from '@patternfly/react-charts/victory';
import { Chart, ChartAxis, ChartBullet, ChartLegend, ChartThemeColor } from '@patternfly/react-charts/victory';

export const ChartBulletSkeleton: React.FunctionComponent = () => {
const [isChecked, setIsChecked] = React.useState<boolean>(true);
Expand Down Expand Up @@ -288,7 +288,7 @@ export const ChartBulletSkeleton: React.FunctionComponent = () => {
```js
import React from 'react';
import { Switch } from '@patternfly/react-core';
import { Chart, ChartAxis, ChartDonut } from '@patternfly/react-charts/victory';
import { Chart, ChartAxis, ChartDonut, ChartThemeColor } from '@patternfly/react-charts/victory';

export const ChartDonutSkeleton: React.FunctionComponent = () => {
const [isChecked, setIsChecked] = React.useState<boolean>(true);
Expand Down Expand Up @@ -327,7 +327,7 @@ export const ChartDonutSkeleton: React.FunctionComponent = () => {
```js
import React from 'react';
import { Switch } from '@patternfly/react-core';
import { Chart, ChartAxis, ChartDonutUtilization } from '@patternfly/react-charts/victory';
import { Chart, ChartAxis, ChartDonutUtilization, ChartThemeColor } from '@patternfly/react-charts/victory';

export const ChartDonutUtilizationSkeleton: React.FunctionComponent = () => {
const [isChecked, setIsChecked] = React.useState<boolean>(true);
Expand Down Expand Up @@ -376,7 +376,7 @@ export const ChartDonutUtilizationSkeleton: React.FunctionComponent = () => {
```js
import React from 'react';
import { Switch } from '@patternfly/react-core';
import { Chart, ChartAxis, ChartDonutThreshold, ChartDonutUtilization } from '@patternfly/react-charts/victory';
import { Chart, ChartAxis, ChartDonutThreshold, ChartDonutUtilization, ChartThemeColor } from '@patternfly/react-charts/victory';

export const ChartDonutUtilizationSkeleton: React.FunctionComponent = () => {
const [isChecked, setIsChecked] = React.useState<boolean>(true);
Expand Down Expand Up @@ -420,7 +420,7 @@ export const ChartDonutUtilizationSkeleton: React.FunctionComponent = () => {
```js
import React from 'react';
import { Switch } from '@patternfly/react-core';
import { Chart, ChartVoronoiContainer, ChartGroup, ChartAxis, ChartLine } from '@patternfly/react-charts/victory';
import { Chart, ChartVoronoiContainer, ChartGroup, ChartAxis, ChartLine, ChartThemeColor } from '@patternfly/react-charts/victory';

export const ChartLineSkeleton: React.FunctionComponent = () => {
const [isChecked, setIsChecked] = React.useState<boolean>(true);
Expand Down Expand Up @@ -510,7 +510,7 @@ export const ChartLineSkeleton: React.FunctionComponent = () => {
```js
import React from 'react';
import { Switch } from '@patternfly/react-core';
import { Chart, ChartAxis, ChartPie } from '@patternfly/react-charts/victory';
import { Chart, ChartAxis, ChartPie, ChartThemeColor } from '@patternfly/react-charts/victory';

export const ChartPieSkeleton: React.FunctionComponent = () => {
const [isChecked, setIsChecked] = React.useState<boolean>(true);
Expand Down Expand Up @@ -558,7 +558,7 @@ export const ChartPieSkeleton: React.FunctionComponent = () => {
```js
import React from 'react';
import { Switch } from '@patternfly/react-core';
import { Chart, ChartVoronoiContainer, ChartGroup, ChartAxis, ChartScatter } from '@patternfly/react-charts/victory';
import { Chart, ChartVoronoiContainer, ChartGroup, ChartAxis, ChartScatter, ChartThemeColor } from '@patternfly/react-charts/victory';

export const ChartScatterSkeleton: React.FunctionComponent = () => {
const [isChecked, setIsChecked] = React.useState<boolean>(true);
Expand Down Expand Up @@ -615,7 +615,7 @@ export const ChartScatterSkeleton: React.FunctionComponent = () => {
```js
import React from 'react';
import { Switch } from '@patternfly/react-core';
import { Chart, ChartVoronoiContainer, ChartAxis, ChartStack, ChartBar } from '@patternfly/react-charts/victory';
import { Chart, ChartVoronoiContainer, ChartAxis, ChartStack, ChartBar, ChartThemeColor } from '@patternfly/react-charts/victory';

export const ChartStackSkeleton: React.FunctionComponent = () => {
const [isChecked, setIsChecked] = React.useState<boolean>(true);
Expand Down Expand Up @@ -671,7 +671,7 @@ export const ChartStackSkeleton: React.FunctionComponent = () => {
```js
import React from 'react';
import { Switch } from '@patternfly/react-core';
import { Chart, ChartVoronoiContainer, ChartLegend, ChartAxis, ChartThreshold, ChartGroup, ChartArea } from '@patternfly/react-charts/victory';
import { Chart, ChartArea, ChartAxis, ChartGroup, ChartLegend, ChartThemeColor, ChartThreshold, ChartVoronoiContainer } from '@patternfly/react-charts/victory';
import chart_color_blue_300 from '@patternfly/react-tokens/dist/esm/chart_color_blue_300';

export const ChartThresholdSkeleton: React.FunctionComponent = () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/react-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@patternfly/react-table": "workspace:^",
"@patternfly/react-templates": "workspace:^",
"@patternfly/react-tokens": "workspace:^",
"victory": "^37.3.4"
"victory": "^37.3.6"
},
"devDependencies": {
"@patternfly/documentation-framework": "^6.5.4",
Expand Down
Loading

0 comments on commit 96b03ba

Please sign in to comment.