Coder Social home page Coder Social logo

systembugtj / angular-chartist.js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from willsoto/angular-chartist.js

0.0 3.0 0.0 1.81 MB

Angular directive for Chartist.js

Home Page: http://paradox41.github.io/angular-chartist.js

License: MIT License

CSS 0.27% JavaScript 76.04% HTML 23.69%

angular-chartist.js's Introduction

angular-chartist.js

Bower Version npm Version npm installs Travis CI David

Angular directive for Chartist.js

Formerly known as ng-chartist.js

http://paradox41.github.io/angular-chartist.js

Installation

Install via bower

bower install angular-chartist.js --save

Install via npm

npm install angular-chartist.js --save

Usage

Make sure you have loaded the necessary scripts in the correct order. Add angular-chartist as a module dependency, like so:

var app = angular.module('app', ['angular-chartist']);

Please note: if you were using this prior to 2.0, the module name was ngChartist.

In your HTML, add the chartist directive to any div or make it a custom element:

<chartist class="ct-chart" chartist-data="chartist.barData" chartist-chart-type="Bar"></chartist>

Ensure that you also have, at the very least, the ct-chart class on the element and that you provide the chartist-data and chartist-chart-type attributes.

All attributes are namespaced under chartist

Possible attributes:

  • chartist-data (required)
  • chartist-chart-type (required): The chart type should start with a capital letter
  • chartist-events (optional): An object containing key:value pairs in the following format:
{
  event: function eventHandler(obj) {
    // do stuff on event
  }
}
  • chartist-chart-options (optional)
  • chartist-responsive-options (optional)

For the sorts of values these options accept, check out the Chartist.js docs

Issues?

This directive is simply a wrapper, anything you pass to the directive gets passed right through to the appropriate method on the Chartist side. Any issues with the charts, data, options, etc, should be filed against Chartist.js

Feel free to file an issue / PR if you feel that the directive can be improved in some way though.

angular-chartist.js's People

Contributors

willsoto avatar paradox41 avatar gionkunz avatar pieterjandesmedt avatar carlcraig avatar mgustafsson1 avatar paulchubatyy avatar tomneyland avatar villelahdenvuo avatar bdwain avatar

Watchers

SystemBug avatar James Cloos avatar  avatar

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.