GithubHelp home page GithubHelp logo

dbk4002 / angular-google-chart Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 2.0 409 KB

Google Chart Implementation In Angular 6

Home Page: https://dbk4002.github.io/angular-google-chart/

License: MIT License

TypeScript 84.47% JavaScript 3.81% HTML 11.54% CSS 0.18%
google-visualization google-charts angular5 typescript data-visualization chart-component angular6 angular6-component

angular-google-chart's Introduction

Angular Google Chart Component

This project was generated with Angular CLI version 6.0.7.

How To Use

  1. Import Google Chart Module to your module file : import {GoogleChartModule} from './angular-google-chart/google-chart.module';

  2. Add component in HTML <google-chart [chartType]="'LineChart'" [dataPromise]="dataPromise" [options]="options" (onSelect)="onSelect($event)" ></google-chart>

Options

  • chartType - Type of Chart. For example: LineChart, ScatterChart, AreaChart, BarChart, BubbleChart, CandlestickChart, ColumnChart, ComboChart, PieChart, Gantt,Gauge, GeoChart, Histogram, OrgChart, Sankey, SteppedAreaChart, Table, Timeline, TreeMap, WordTree, Calendar, Map

  • dataPromise - Promise to fetch data

  • options - Google Chart Option Object Google Chart Customization

  • config - Chart additional configuration object. For example, chart data does not have header & starts with row only then set firstRowAsData as true.

  • onInit - Event which will be fired when angular chart component will be initialized with ChartWrapper. It will return div - dynamic generated div Id for reference & wrapper - Reference to ChartWrapper to make changes and modify chart configuration and data manually

  • onReady - Event which fires every time chart is rendered & ready with new data or options. This event has no parameters.

  • onError - Event which fires on error while rendering chart.

  • onSelect - Event which will ne called on selecting data points on chart

Configuration

Provided angular-google-chart.config JSON file which has following configuration options:

  • packages - Packages to load. This is depend on chart type you use.

  • mapsApiKey - Google Developer API Key in order to access google map JS API.

Features

  • Inbuild Google Library Loading - All related library and packages will be loaded throgh component so no need to include explicitly and loading chart relaed packages

  • Data Changes Aware - Component is data changes aware so in case of changes in data promise, chart will rerender again automatically.

  • Option Changes Aware - Any changes made to Google Option Object, will be automatically drawn to chart.

Demo

Setup latest angular CLI(6.0.7) then clone this repo and fire command ng serve

Please refer demo.component for all chart type demo.

Roadmap

Reffer Wiki

Screenshot

alt text

angular-google-chart's People

Contributors

dbk4002 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

angular-google-chart's Issues

Resize Sankey

I want to resize the sankey chart, but it has a custom div that i can't change.

angular-google-chart "geochart" with slider through years

Hi, I'm trying to create a map to show the effects of climate change on the planet through the years, the problem is that when I run the slider the geochart "flicker" / "blincking" .
but after 1/2 minutes go smooth, as if the geochart keeps making requests and when it is finished then the geochart with the slider goes smooth, but these requests continue even after it goes smooth so I don't understand how to make the geochart go smooth from start, I leave you my question on stackoverflow below for all the information
Thank you
https://stackoverflow.com/questions/70999445/angular-google-chart-geochart-with-slider-through-years

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.