All Projects β†’ tomauty β†’ React Native Chart

tomauty / React Native Chart

Licence: mit
[NOT MAINTAINED] πŸ“Š Add line, area, pie, and bar charts to your React Native app

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React Native Chart

Ngx Charts
πŸ“Š Declarative Charting Framework for Angular
Stars: ✭ 4,057 (+157.75%)
Mutual labels:  svg, chart
Ngx Graph
Graph visualization library for angular
Stars: ✭ 704 (-55.27%)
Mutual labels:  svg, chart
Vue Bar
Simple, elegant spark bars for Vue.js
Stars: ✭ 414 (-73.7%)
Mutual labels:  svg, chart
Go Chart
go chart is a basic charting library in go.
Stars: ✭ 3,254 (+106.73%)
Mutual labels:  svg, chart
Pure Vue Chart
Simple and lightweight vue chart component without using chart library dependencies
Stars: ✭ 50 (-96.82%)
Mutual labels:  svg, chart
Rumble Charts
React components for building composable and flexible charts
Stars: ✭ 293 (-81.39%)
Mutual labels:  svg, chart
React D3 Tree
🌳 React component to create interactive D3 tree graphs
Stars: ✭ 543 (-65.5%)
Mutual labels:  svg, chart
Picasso.js
A charting library streamlined for building interactive visualizations for the Qlik product suites.
Stars: ✭ 175 (-88.88%)
Mutual labels:  svg, chart
Svg Radar Chart
Generate SVG radar charts.
Stars: ✭ 45 (-97.14%)
Mutual labels:  svg, chart
Chart.xkcd
Chart.xkcd is a chart library that plots β€œsketchy”, β€œcartoony” or β€œhand-drawn” styled charts.
Stars: ✭ 6,982 (+343.58%)
Mutual labels:  svg, chart
Laue
πŸ––πŸ“ˆ Modern charts for Vue 2.0
Stars: ✭ 245 (-84.43%)
Mutual labels:  svg, chart
React Fast Charts
Blazing Fast Charting Library in React with loading time less than 50ms
Stars: ✭ 113 (-92.82%)
Mutual labels:  svg, chart
Charts
Simple, responsive, modern SVG Charts with zero dependencies
Stars: ✭ 14,112 (+796.57%)
Mutual labels:  svg, chart
Britecharts
Client-side reusable Charting Library based on D3.js v5 that allows easy and intuitive use of charts and components that can be composed together creating amazing visualizations.
Stars: ✭ 3,688 (+134.31%)
Mutual labels:  svg, chart
Visx
🐯 visx | visualization components
Stars: ✭ 14,544 (+824.02%)
Mutual labels:  svg, chart
Billboard.js
πŸ“Š Re-usable, easy interface JavaScript chart library based on D3.js
Stars: ✭ 5,032 (+219.7%)
Mutual labels:  svg, chart
Pyecharts Snapshot
renders the output of pyecharts as png, jpeg, gif, svg, eps, pdf and raw base64
Stars: ✭ 142 (-90.98%)
Mutual labels:  svg, chart
Wechart
Create all the [ch]arts by cax or three.js - Cax ε’Œ three.js εˆ›ι€ δΈ€εˆ‡ε›Ύ[葨]
Stars: ✭ 152 (-90.34%)
Mutual labels:  svg, chart
Amcharts4
The most advanced amCharts charting library for JavaScript and TypeScript apps.
Stars: ✭ 907 (-42.38%)
Mutual labels:  svg, chart
C3
πŸ“Š A D3-based reusable chart library
Stars: ✭ 9,163 (+482.15%)
Mutual labels:  svg, chart

react-native-chart

NOTE: I have not been able to maintain this repo. Recommend switching to Victory Charts.

Screenshot

Getting Started

NPM

  1. npm i react-native-chart --save

Link ART to your project

  1. Right click Libraries and click 'Add Files to {YourProject}'

screen shot 2016-06-17 at 3 39 24 pm

  1. Navigate to your project's node_modules/react-native/Libraries/ART and select 'ART.xcodeproj'

screen shot 2016-06-17 at 3 39 42 pm

  1. Go to Build Phases -> Link Binary With Libraries

screen shot 2016-06-17 at 3 40 00 pm

4 Click the '+', and add libART.a

screen shot 2016-06-17 at 3 40 03 pm

Then rebuild.

Usage

import React, { StyleSheet, View, Component } from 'react-native';
import Chart from 'react-native-chart';

const styles = StyleSheet.create({
	container: {
		flex: 1,
		justifyContent: 'center',
		alignItems: 'center',
		backgroundColor: 'white',
	},
	chart: {
		width: 200,
		height: 200,
	},
});

const data = [[
	[0, 1],
	[1, 3],
	[3, 7],
	[4, 9],
]];

class SimpleChart extends Component {
	render() {
		return (
			<View style={styles.container}>
				<Chart
					style={styles.chart}
					data={data}
					verticalGridStep={5}
					type="line"
					showDataPoint={true}
					color={['#e1cd00']}
				 />
			</View>
		);
	}
}

Properties

Use '' y-values to signify the 'render but empty' data points.

Property Type Description Required Default
data Array< Array< [number, number] > > An array of arrays of [x, y] pairs. Yes
type string pie/bar/line Yes bar
color Array < string > Color of bars/line in line chart No #4DC4E6
cornerRadius number Corner radius of bars in bar chart No 0
fillColor Array < string > Fill area colors in line chart No
dataPointColor Array < string > Stroke colors for line chart data point No
dataPointFillColor Array < string > Fill colors for line chart data point No
dataPointRadius number Radius of the data point No 3
lineWidth number Width of line chart line No 1
showDataPoint boolean Show data points on line chart No false
sliceColors Array < string > Array of colors for pie chart slices Yes [ < random colors > ]
axisColor string Color of axis lines No #333333
axisLabelColor string Color of axis test No #333333
axisLineWidth number Width of axis lines No 1
gridColor string Color of grid lines No #333333
gridLineWidth number Width of grid lines No 0.5
hideHorizontalGridLines boolean Hide grid lines going from LTR No false
hideVerticalGridLines boolean Hide grid lines going up -> down No false
showAxis boolean Show the X and Y axes No true
showGrid boolean Show the grid No true
showXAxisLabels boolean Show X-Axis labels No true
showYAxisLabels boolean Show Y-Axis labels No true
style object Style on the container No {}
tightBounds boolean Tighten min and max bounds strictly to min/max in dataset No false
verticalGridStep number How many vertical grid lines to show No 4
horizontalGridStep number How many horizontal grid lines to show No all
xAxisHeight number Height of X-axis container No 20
yAxisTransform Function Transform data point to y-axis label No (_) => _
xAxisTransform Function Transform data point to x-axis label No (_) => _
yAxisWidth number Width of the Y-axis container No 30
yAxisUseDecimal boolean Show decimals on Y-axis labels No false
yAxisShortLabel boolean Shorten yAxis labels with K, M, B for thousand<->billion, etc No false

TODO

  • Code cleanup
  • Multi-line chart
  • Horizontal line chart
  • Scatter chart
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].