install angular-morris-chart
by bower or npm running the following command
$ bower install angular-morris-chart --save
or
$ npm install angular-morris-chart --save
or download here
then append angular-morris-chart.min.js
in to end of body, before your project, after the angular
and the other libs.
<!--using bower-->
...
...
<script src="../bower_components/angular-morris-chart/src/angular-morris-chart.min.js"></script>
...
...
</body>
</html>
<!--using npm-->
...
...
<script src="../node_modules/angular-morris-chart/src/angular-morris-chart.min.js"></script>
...
...
</body>
</html>
add angular.morris-chart
as a module dependency for your app
angular.module('my.app', [
'angular.morris-chart'
])
There are four directives based on morris.js
bar-chart
line-chart
donut-chart
area-chart
Check out documentation for live examples
- install node and bower on your environment
cd to your desired folder and clone angular-morris-chart
repository
$ git clone https://github.com/stewones/angular-morris-chart
$ cd angular-morris-chart
install all project dependencies
$ npm install
$ bower install
serve lib/docs with live reload
#this serves docs on `http://localhost:3000` with live reload
$ gulp serve
serve lib/docs on distribution mode
#same above but with minified sources for distribution
$ gulp serve:dist
build all to distribution
#this generates minified src at `src/angular-morris-chart.min.js`, and docs on `dist/doc` folder.
$ gulp build
serve tests
#run unit test with karma
$ gulp test
serve automated tests
#unit test with live reload
$ gulp test:auto
Notes:
-
To contribute with this awesome project, just open an issue, then fork the project and make a new branch to do your work.
-
Run
gulp build
before make your PR. -
To update docs site, just make another PR on
gh-pages
branch with only content generated indist/doc
. Please make sure that all tests are passing bygulp test
. Verify all the tasks located on gulp folder for more details.
Feel free to open issues if you run into a problem or if you just have suggestions. PR´s are always welcome.
angular-morris-chart
is open-sourced software licensed under MIT.