Skip to content

Commit

Permalink
Added a sample for Line chart with more specific props
Browse files Browse the repository at this point in the history
  • Loading branch information
Arman92 committed Jan 2, 2017
1 parent 4163675 commit 4792921
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ var Component = React.createClass({
<TitleBar/>
<View style={styles.chartContainer}>
<BarChart style={{flex:1}} data={this.getBarData()}/>

<BarChart
style={{flex:1}}
data={this.getRandomData()}
Expand All @@ -149,6 +150,37 @@ var Component = React.createClass({
description={"测试"}
legend={{enable:true,position:'ABOVE_CHART_LEFT',direction:"LEFT_TO_RIGHT"}}
/>

<LineChart
style={{flex:1}}
data={this.getRandomData()}
visibleXRange={[0,30]}
maxVisibleValueCount={50}
xAxis={{
drawGridLines:false,
gridLineWidth:1,
position:"BOTTOM",
labelRotationAngle: 12.0,
spaceBetweenLabels: 10,
}}
yAxisRight={{enable:false}}
yAxis={{
startAtZero:false,
drawGridLines:true,
position:"OUTSIDE_CHART",
textColor: "#E94343"
}}
drawGridBackground={false}
backgroundColor={"#FAFAFA"}
description={"Line Chart sample"}
legend={{enable:true,position:'ABOVE_CHART_LEFT',direction:"LEFT_TO_RIGHT", legendForm: "CIRCLE"}}
pinchZoom={true}
dragDecelerationFrictionCoef={0.5}
noDataText={"No data available"}
onSelect={(e) => {
console.log("onSelect xIndex", e.nativeEvent.xIndex, "yValue:", e.nativeEvent.yValue);
}}
/>
</View>
</View>
);
Expand Down

0 comments on commit 4792921

Please sign in to comment.