AndrewJBateman / angular-data-dashboard

:clipboard: Angular dashboard to display data using Google charts

Home Page:https://AndrewJBateman.github.io/angular-data-dashboard/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

⚑ Angular Data Dashboard

GitHub repo size GitHub pull requests GitHub Repo stars GitHub last commit

πŸ“„ Table of contents

πŸ“š General info

  • Google chart tools have a wide range of interactive charts and data tools.
  • The Google Charts script files from https://www.gstatic.com/charts/loader.js are loaded into assets/js/loader.js and this path is included in the scripts section of the angular.json file.
  • A google-chart.service module is added so the Google Charts script can be used by multiple charts in the app.

πŸ“· Screenshots

Example screenshot

πŸ“Ά Technologies

πŸ’Ύ Setup

  • Run npm i to install dependencies.
  • Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.
  • Run npm run build to build the project. The build artifacts will be stored in the docs/ directory.

πŸ’» Code Examples

// method using the Google Charts library with the gLib variable
// create a new chart using the LineChart method, passing in the container div to show the line chart.
private drawChart() {
  const data = this.gLib.visualization.arrayToDataTable([
    ['Year', 'Sales', 'Expenses'],
    ['2004',  1000,      400],
    ['2005',  1170,      460],
    ['2006',  660,       1120],
    ['2007',  1030,      540]
  ]);

  const options = {
    title: 'Company Performance',
    curveType: 'function',
    legend: { position: 'bottom' }
  };

  const chart = new this.gLib.visualization.LineChart(document.getElementById('divLineChart'));

  chart.draw(data, options);
}j

πŸ†’ Features

  • Cross-browser compatibility.
  • Dashboards can be used to manage multiple charts that share the same data.
  • Data can also be fetched from a REST API endpoint or database service call.

πŸ“‹ Status & To-Do List

  • Status: Working & deployed to GitHub.
  • To-Do: Nothing
  • Note: App is designed for PC/tablet and does not resize well for phones - could use angular mat cards or flex-grid to make it fully responsive

πŸ‘ Inspiration

πŸ“ License

  • This project is licensed under the terms of the MIT license.

βœ‰οΈ Contact

About

:clipboard: Angular dashboard to display data using Google charts

https://AndrewJBateman.github.io/angular-data-dashboard/

License:MIT License


Languages

Language:TypeScript 82.2%Language:JavaScript 10.7%Language:HTML 5.6%Language:CSS 1.5%