12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- import React, { Component } from 'react';
- import {
- StyleSheet,
- View,
- FlatList, Image,
- } from 'react-native';
- import BIChartsItem from "../commons/bi/BIChartsItem";
- import BasePage from "./BasePage";
- export default class EChartsPage extends BasePage {
- static navigationOptions = {
- headerBackImage:(
- <View style={{marginLeft:18}}>
- <Image
- source={{uri: 'uu_back-icon'}}
- style={{ width: 12, height: 20,marginRight:6}}
- />
- </View>
- ),
- }
- constructor(props){
- super(props);
- this.state={
- dataArray:['line','bar','pie'],
- }
- }
- renderItem(data){
- return <BIChartsItem
- typeTitle = {data.item}
- />
- }
- render() {
- return (
- <View style={styles.container}>
- <FlatList
- data={this.state.dataArray}
- keyExtractor={item => "" + (item.item)}
- renderItem = {data=>this.renderItem(data)}
- />
- </View>
- );
- }
- }
- const styles = StyleSheet.create({
- container: {
- flex:1,
- backgroundColor: '#efefef',
- },
- title:{
- color:'white',
- fontSize:20,
- textAlign:'center',
- },
- });
|