# react-native-histogram

> The histogram component for React Native

Latest version **0.2.0** (published 2016-01-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-histogram
pnpm add react-native-histogram
yarn add react-native-histogram
bun add react-native-histogram
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2016-01-17 |
| First published | 2016-01-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 16 |
| Author | moschan |
| Maintainers | moschan |
| Keywords | react-component, react-native, ios, android, histogram, chart, graph |

## Links

- npm: https://www.npmjs.com/package/react-native-histogram
- Repository: https://github.com/moschan/react-native-histogram
- Homepage: https://github.com/moschan/react-native-histogram#readme
- Issues: https://github.com/moschan/react-native-histogram/issues
- npm.io page: https://npm.io/package/react-native-histogram

## Alternatives

- [d3-force-3d](https://npm.io/package/d3-force-3d.md) — 1.0M weekly downloads
- [ng2-charts](https://npm.io/package/ng2-charts.md) — 486.8K weekly downloads
- [@arcgis/core](https://npm.io/package/@arcgis/core.md) — 257.8K weekly downloads
- [react-sparklines](https://npm.io/package/react-sparklines.md) — 249.3K weekly downloads
- [react-native-gifted-charts](https://npm.io/package/react-native-gifted-charts.md) — 182.3K weekly downloads

## Recent versions

- 0.2.0 (latest) — 2016-01-17
- 0.1.0 — 2016-01-12

## README

react-native-histogram
===

> histogram component for React Native

[![npm](https://img.shields.io/npm/v/react-native-histogram.svg)]()[![npm](https://img.shields.io/npm/l/react-native-histogram.svg)]()

[![NPM](https://nodei.co/npm/react-native-histogram.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/react-native-histogram/)


Demo
---
![](./doc/beta2.gif)


Installation
==

in Cli
---
```
npm i react-native-histogram
```

in JavaScirpt
---
```
import Histogram from 'react-native-histogram';
```


Usage
===

```
var HistogramExample = React.createClass({
  getInitialState: function() {
    return {data: [{}]}
  },
  componentWillMount: function() {
    var row_datas = [];
    for (var i=0; i<500; i++) {
      row_datas[i] = Math.random() * 100;
    }
    this.setState({
      data: [{ data: row_datas }]
    })
  },
  render: function() {
    return (
      <View style={styles.container}>
        <View>
          <Histogram
            data={this.state.data}
            height={200}
            width={300}
            split={20}
          />
        </View>
      </View>
    );
  }
});

```

Simple
---
```
<Histogram data={this.state.data} />
```

Props
===

data(Array) `Default: []`
---
The value of histogram like a `[{data: [10, 13, 8, 19, 17]}]`


TODO
===
- [x] show simple histogram
- [x] show values
- [ ] show balloon
- [ ] show multiple historgams
- [ ] show unit


Contributing
==
Of course! Welcome :)


License
==
MIT

---
_Source: https://npm.io/package/react-native-histogram · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
