import React, {useState} from 'react';
import {StyleSheet, Text, View, Button, TextInput, Dimensions, StatusBar} from 'react-native';
import { LineChart} from 'react-native-chart-kit';
import { LinearGradient } from 'expo-linear-gradient';
import PropValueCard from './components/PropValueCard'
export default function App() {
const [outputText, setOutputText] = useState('This is the first text');
const [flag, setFlag] = useState(false);
const initialState = [];
for(let i=0; i < 100; ++i) {
initialState.push( Math.random() * 100);
}
const [graphData, setGraphData] = useState(initialState);
const makeNewGraphData = () => {
setGraphData( oldGraphData => {
console.log("Before", oldGraphData)
oldGraphData.pop();
oldGraphData.unshift(Math.random() * 100);
console.log("After", oldGraphData);
return oldGraphData.slice();
})
};
const makeNewGraphData2 = () => {
graphData.pop();
graphData.unshift(Math.random() * 100);
setGraphData(graphData);
};
let tutorial = (
Text1
);
let mine = (
View1
View2
View3
{flag ? "Text1" : "Text2"}
);
let graph = (
`rgba(255, 255, 255, 0.8)`,
style: {
borderRadius: 16
}
}}
style={{
borderRadius: 16,
}}
bezier
withDots={false}
withInnerLines={false}
withOuterLines={false}
withVerticalLabel={false}
withHorizontalLabels={true}
fromZero={true}
/>
);
return graph;
}
const styles = StyleSheet.create({
container: {
flex: 1,
padding: 50,
backgroundColor: '#7573ee',
//alignItems: 'center',
//justifyContent: 'center',
justifyContent: 'space-between'
},
view1: {
backgroundColor: 'green',
height: 300
},
view2: {
backgroundColor: 'blue',
height: 100,
},
view3: {
backgroundColor: 'white',
height: 25
}
});