# highcharts-for-react

> highcharts的简单封装

Latest version **0.0.4** (published 2019-01-01) · ISC license · 0 weekly downloads

## Install

```sh
npm install highcharts-for-react
pnpm add highcharts-for-react
yarn add highcharts-for-react
bun add highcharts-for-react
```

## 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.0.4 |
| Published | 2019-01-01 |
| First published | 2018-12-27 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 780 KB |
| Known vulnerabilities | 0 (+3 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | 384254745@qq.com |
| Maintainers | wxgg |
| Keywords | chart, react, highcharts, graph |

## Links

- npm: https://www.npmjs.com/package/highcharts-for-react
- Repository: https://github.com/wxgg/highcharts-for-react/tree/develop
- Issues: https://github.com/wxgg/highcharts-for-react/issues
- npm.io page: https://npm.io/package/highcharts-for-react

## Dependencies (2)

- [highcharts](https://npm.io/package/highcharts.md) ^7.0.1
- [fast-deep-equal](https://npm.io/package/fast-deep-equal.md) ^2.0.1

## 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.0.4 (latest) — 2019-01-01
- 0.0.4-test — 2020-06-01
- 0.0.3 — 2019-01-01
- 0.0.2-beta — 2018-12-31
- 0.0.1-beta — 2018-12-28
- 1.0.0 — 2018-12-27

## README

# highcharts-for-react
>对 highcharts 的 的简单封装。

## 使用示例
```javascript
    import { Highcharts, HighchartsStock, HighchartsMap } from  'highcharts-for-react';
    //或
    import Highcharts from  'highcharts-for-react/lib/Highcharts';
    <Highcharts 
        afterFristRender = {(chart, options) => {console.log(chart);}} //第一次渲染完成之后
        afterRender = {(chart, options) => {console.log(chart)}}//渲染完成之后
        beforeFristRender = {(options) => {console.log(options)}}//第一次渲染完成之前
        beforeRender = {(options) => {console.log(options)}}//渲染之前
        options = {{
                chart: {
                    type: 'bar'                     
                },
                title: {
                    text: '我的第一个图表'                 // 标题
                },
                xAxis: {
                    categories: ['苹果', '香蕉', '橙子']   // x 轴分类
                },
                yAxis: {
                    title: {
                        text: '吃水果个数'                // y 轴标题
                    }
                },
                series: [{                              // 数据列
                    name: '小明',                        // 数据列名
                    data: [1, 0, 4]                     // 数据
                }, {
                    name: '小红',
                    data: [5, 7, 3]
                }]
        }}
    />
```

## API
### 拥有三个输出对象
- Highcharts 基础图表
- HighchartsStock 堆叠效果图
- HighchartsMap 地图
### afterFristRender: Function(chart, options)
第一次渲染完成之后调用的钩子函数，返回参数有，当前chart对象，以及当前options。
### afterRender： Function(chart, options)
渲染完成之后调用的钩子函数，返回参数有，当前chart对象，以及当前options。
### beforeFristRender： Function(options)
第一次渲染完成之前调用，返回参数为当前options。
### beforeRender： Function(options)
渲染完成之前调用，返回参数为当前options。

### options 
chart 的详细配置。

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