diff --git a/README.md b/README.md index cbd2276..e3f82eb 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ + # dataLab dataLab is a desktop application that enables businesses to stay informed of critical performance metrics through shareable dashboards of live-updating D3 visualizations sourced from their local databases. @@ -10,46 +11,51 @@ The application was made during a 2.5 week project as part of Fullstack Academy' TECHNOLOGIES: React, Redux, Electron, JavaScript, SQL, HTML, CSS, D3, Firebase, Auth0. ## Installation -From your command line: - -```bash -# Clone this repository: +First, clone the repository through git and change to the new directory: +``` git clone https://github.com/dataLabApp/dataLabApp.git -# Navigate to the new directory: cd dataLabApp -# Install the required dependencies: +``` +Then install the required dependencies: +``` npm install -# Run the app: +``` +Run the app: +``` npm start ``` ## Screenshots & Gifs -#### Real-time Updating Dashboards +### Real-time Updating Dashboards  -#### Beautiful D3 Visualizations +### Beautiful D3 Visualizations  -#### Login via Auth0 - +### Query and Slice Data from Local Databases + + +### Create D3 Visualizations from Local Databases + + +### Edit D3 Code Directly for Advanced D3 Users + -#### Export Visualization as SVG - +### User Accounts Maintained with Auth0 and Firebase + -#### Share Visualizations - +### Export D3 Visualization as SVG Object or PDF + -#### Query and Slice Data from Local Databases - +### Share Visualizations + -#### Modify D3 Visualizations - ## Contributors -*[Andrew Hookom](https://www.linkedin.com/in/ahookom/) -*[Bruce Grugett](https://www.linkedin.com/in/bruce-grugett/) -*[Mandi Meidlinger](https://www.linkedin.com/in/mandi-meidlinger/) -*[Sara Al Mughairy](https://www.linkedin.com/in/sawra/) +* [Andrew Hookom](https://www.linkedin.com/in/ahookom/) +* [Bruce Grugett](https://www.linkedin.com/in/bruce-grugett/) +* [Mandi Meidlinger](https://www.linkedin.com/in/mandi-meidlinger/) +* [Sara Al Mughairy](https://www.linkedin.com/in/sawra/) ## License MIT © Andrew Hookom, Bruce Grugett, Mandi Meidlinger, Sara Al Mughairy diff --git a/app/components/ExplorerView.jsx b/app/components/ExplorerView.jsx index 4b39a17..3a7d011 100644 --- a/app/components/ExplorerView.jsx +++ b/app/components/ExplorerView.jsx @@ -20,7 +20,7 @@ import {Button} from 'react-bootstrap' class ExplorerView extends Component { constructor(props) { - let lastSlice = props.data.allSlices[props.data.allSlices.length-1] + let lastSlice = props.data.allSlices.length ? props.data.allSlices[props.data.allSlices.length-1] : null super(props) this.state = { showTextEditor: false, @@ -33,21 +33,21 @@ class ExplorerView extends Component { z_label: '', config: { colorScheme: COLOR_SCHEMES[Object.keys(COLOR_SCHEMES)[0]], - sliceId: lastSlice.id, - data: lastSlice.data, + sliceId: lastSlice ? lastSlice.id : null, + data: lastSlice ? lastSlice.data : [], title: 'Click Here to Write Title', dimensions: { fullHeight: 500, fullWidth: 800 }, x: { - dataColumn: Object.keys(lastSlice.data[0])[0] + dataColumn: lastSlice ? Object.keys(lastSlice.data[0])[0] : null }, y: { - dataColumn: Object.keys(lastSlice.data[0])[1] + dataColumn: lastSlice ? Object.keys(lastSlice.data[0])[1] : null }, z: { - dataColumn: Object.keys(lastSlice.data[0])[2] + dataColumn: lastSlice ? Object.keys(lastSlice.data[0])[2] : null } } } diff --git a/app/components/SliceSelector.jsx b/app/components/SliceSelector.jsx index a30d2fc..29bfcc6 100644 --- a/app/components/SliceSelector.jsx +++ b/app/components/SliceSelector.jsx @@ -4,7 +4,7 @@ import {connect} from 'react-redux' class SliceSelector extends Component { render() { - let currentSliceTitle = this.props.data.allSlices.filter(slice => slice.id === this.props.currentSlice)[0].title + let currentSliceTitle = this.props.currentSlice ? this.props.data.allSlices.filter(slice => slice.id === this.props.currentSlice)[0].title : '' return (