Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow additional props from user, such as aria-label and data-testid #2192

Merged
merged 13 commits into from
Apr 14, 2022
Prev Previous commit
Next Next commit
Remove arbitrary props from demos
  • Loading branch information
Becca Bailey committed Mar 29, 2022
commit 0c31a88cb72cebee12180a584b65444c8dfe8ef8
14 changes: 0 additions & 14 deletions demo/ts/components/group-demo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ class App extends React.Component {
colorScale="qualitative"
>
<VictoryGroup
aria-label="Purple Victory Grouping"
data-testing="Testing this shows up"
color={"purple"}
data={[
{ x: 1, y: 3 },
Expand Down Expand Up @@ -162,18 +160,6 @@ class App extends React.Component {
/>
</VictoryGroup>
</VictoryChart>

<VictoryGroup
aria-label="Stand Alone Group"
data-testing="Testing this shows up"
y={(data) => Math.tan(2 * Math.PI * data.x)}
>
<VictoryLine />
<VictoryVoronoi
labelComponent={<VictoryTooltip />}
labels={({ datum }) => datum.y}
/>
</VictoryGroup>
</div>
</div>
);
Expand Down
2 changes: 0 additions & 2 deletions demo/ts/components/victory-chart-demo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,6 @@ class VictoryChartDemo extends React.Component<any, VictoryChartDemoState> {
style={chartStyle}
polar
title="Victory Polar Scatter Chart"
aria-label="Victory Polar Scatter Chart"
data-some-user-prop="TESTING 123"
desc="Circular graph with a twirl pattern of data points."
>
<VictoryScatter />
Expand Down
30 changes: 19 additions & 11 deletions demo/ts/components/victory-stack-demo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,36 @@ import { VictoryStack } from "@packages/victory-stack/src/index";
import { VictoryArea } from "@packages/victory-area/src/index";

class App extends React.Component {

render() {
return (
<div>
<h3 style={{textAlign: 'center'}}>Standalone Stack</h3>
<VictoryStack
aria-label="Victory Stack Demo"
data-some-user-prop="TESTING 123"
>
<h3 style={{ textAlign: "center" }}>Standalone Stack</h3>
<VictoryStack aria-label="Victory Stack Demo">
<VictoryArea
data={[{x: "a", y: 2}, {x: "b", y: 3}, {x: "c", y: 5}]}
data={[
{ x: "a", y: 2 },
{ x: "b", y: 3 },
{ x: "c", y: 5 }
]}
/>
<VictoryArea
data={[{x: "a", y: 1}, {x: "b", y: 4}, {x: "c", y: 5}]}
data={[
{ x: "a", y: 1 },
{ x: "b", y: 4 },
{ x: "c", y: 5 }
]}
/>
<VictoryArea
data={[{x: "a", y: 3}, {x: "b", y: 2}, {x: "c", y: 6}]}
data={[
{ x: "a", y: 3 },
{ x: "b", y: 2 },
{ x: "c", y: 6 }
]}
/>
</VictoryStack>
</div>
)
);
}
}

export default App;
export default App;