We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can we use timestamps as the X axis values?
Tried the following code with data formatted like
{x: '2019-01-01 9:00am', y: 10}, {x: '2019-01-01 9:00pm', y: 20},
but it renders incorrectly. The correct chart should not be so linear.
Any help greatly appreciated!
Actual Code
import React from 'react'; import { StyleSheet, Text, View } from 'react-native'; import PureChart from 'react-native-pure-chart'; export default function App() { let sampleData = [ {x: '2019-01-01 9:00am', y: 10}, {x: '2019-01-01 9:00pm', y: 20}, {x: '2019-01-08 3:00am', y: 30}, {x: '2019-01-08 3:00pm', y: 40}, {x: '2019-01-09 7:00am', y: 30}, {x: '2019-01-09 7:00pm', y: 20}, ] return ( <View style={styles.container}> <PureChart data={sampleData} type='line' width={'100%'} height={300} /> </View> ); } const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: '#eee', alignItems: 'center', justifyContent: 'center', }, });
The text was updated successfully, but these errors were encountered:
No branches or pull requests
How can we use timestamps as the X axis values?
Tried the following code with data formatted like
but it renders incorrectly. The correct chart should not be so linear.
Any help greatly appreciated!
Actual Code
The text was updated successfully, but these errors were encountered: