Skip to content

Commit 226d9a2

Browse files
committed
Adds a few more demos to victory charts
1 parent a28aa7d commit 226d9a2

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

demo/js/components/victory-chart-demo.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -203,11 +203,7 @@ class App extends React.Component {
203203
</VictoryChart>
204204

205205
<VictoryChart style={assign({}, chartStyle, bgStyle)}>
206-
<VictoryScatter data={[{ x: -3, y: -3 }]} />
207-
</VictoryChart>
208-
209-
<VictoryChart style={chartStyle} theme={dependentAxisTheme}>
210-
<VictoryScatter />
206+
<VictoryScatter data={[{ x: -3, y: -3 }, { x: -2, y: 2 }, { x: 1, y: -1 }]} />
211207
</VictoryChart>
212208

213209
<VictoryChart style={chartStyle} theme={dependentAxisTheme}>

demo/ts/components/victory-chart-demo.tsx

+10-2
Original file line numberDiff line numberDiff line change
@@ -220,12 +220,20 @@ class VictoryChartDemo extends React.Component<any, VictoryChartDemoState> {
220220
tickLabels: { fill: "none" }
221221
};
222222

223+
const bgStyle: { [key: string]: React.CSSProperties } = {
224+
background: { fill: "#e6e6ff" }
225+
};
226+
223227
return (
224228
<div className="demo">
225229
<h1>VictoryChart</h1>
226230
<div style={containerStyle}>
227-
<VictoryChart style={chartStyle}>
228-
<VictoryScatter data={[{ x: -3, y: -3 }]} />
231+
<VictoryChart style={chartStyle} polar>
232+
<VictoryScatter />
233+
</VictoryChart>
234+
235+
<VictoryChart style={assign({}, chartStyle, bgStyle)}>
236+
<VictoryScatter data={[{ x: -3, y: -3 }, { x: -2, y: 2 }, { x: 1, y: -1 }]} />
229237
</VictoryChart>
230238

231239
<VictoryChart style={chartStyle} theme={dependentAxisTheme}>

0 commit comments

Comments
 (0)