Skip to content
This repository has been archived by the owner on Feb 19, 2022. It is now read-only.

Commit

Permalink
add domainPadding, configure axes
Browse files Browse the repository at this point in the history
  • Loading branch information
boygirl committed Nov 5, 2016
1 parent a016e8e commit 5f3bffa
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
14 changes: 12 additions & 2 deletions demo/index.android.js
Expand Up @@ -11,7 +11,7 @@ import {
StyleSheet,
Text
} from "react-native";
import { VictoryBar, VictoryChart } from "victory-native";
import { VictoryAxis, VictoryBar, VictoryChart } from "victory-native";

const styles = StyleSheet.create({
container: {
Expand Down Expand Up @@ -42,7 +42,17 @@ class Demo extends Component {
return (
<ScrollView contentContainerStyle={styles.container}>
<Text style={styles.text}>{"Victory Tutorial"}</Text>
<VictoryChart>
<VictoryChart
domainPadding={40}
>
<VictoryAxis
tickValues={[1, 2, 3, 4]}
tickFormat={["Quarter 1", "Quarter 2", "Quarter 3", "Quarter 4"]}
/>
<VictoryAxis
dependentAxis
tickFormat={(x) => (`$${x / 1000}k`)}
/>
<VictoryBar
style={{
data: {fill: "blue"}
Expand Down
14 changes: 12 additions & 2 deletions demo/index.ios.js
Expand Up @@ -11,7 +11,7 @@ import {
StyleSheet,
Text
} from "react-native";
import { VictoryBar, VictoryChart } from "victory-native";
import { VictoryAxis, VictoryBar, VictoryChart } from "victory-native";

const styles = StyleSheet.create({
container: {
Expand Down Expand Up @@ -42,7 +42,17 @@ class Demo extends Component {
return (
<ScrollView contentContainerStyle={styles.container}>
<Text style={styles.text}>{"Victory Tutorial"}</Text>
<VictoryChart>
<VictoryChart
domainPadding={40}
>
<VictoryAxis
tickValues={[1, 2, 3, 4]}
tickFormat={["Quarter 1", "Quarter 2", "Quarter 3", "Quarter 4"]}
/>
<VictoryAxis
dependentAxis
tickFormat={(x) => (`$${x / 1000}k`)}
/>
<VictoryBar
style={{
data: {fill: "blue"}
Expand Down

0 comments on commit 5f3bffa

Please sign in to comment.