-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.js
More file actions
35 lines (34 loc) · 1.21 KB
/
index.js
File metadata and controls
35 lines (34 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/**
* Created by Dowin on 17/1/4.
*/
import React, { Component } from 'react';
import { requireNativeComponent} from 'react-native';
var ChartView = requireNativeComponent('charV', ZKChartView);
import PropTypes from 'prop-types';
export default class ZKChartView extends Component {
static propTypes = {
/**
*
* 定义组件需要传到原生端的属性
* 使用React.PropTypes来进行校验
*/
dataArr:PropTypes.array,
dataArrOfX:PropTypes.array,
isShow:PropTypes.bool, //可为空 默认true
lineColor:PropTypes.string, //可为空 默认0xf38b10
layerColor:PropTypes.string, //可为空 默认0xf38b10
labelTextColor:PropTypes.string, //可为空 默认0xf38b10
labelLayerColor:PropTypes.string, //可为空 默认0xf38b10
maxValue:PropTypes.string, //y轴最大值
minValue:PropTypes.string, //y轴最小值
tagNum:PropTypes.number, //y轴分布数
lineWidth:PropTypes.number,//连线宽度
upAlpha:PropTypes.number,//上层透明度
downAlpha:PropTypes.number,//下层透明度
};
render() {
return (
<ChartView {...this.props} />
);
}
}