├── .gitignore
├── docs
└── source
│ ├── assets
│ ├── js
│ │ ├── directives.js
│ │ ├── filters.js
│ │ ├── services.js
│ │ ├── app.js
│ │ ├── controllers.js
│ │ └── tailcoat.js
│ ├── img
│ │ ├── dots.svg
│ │ ├── y.svg
│ │ ├── legend.svg
│ │ ├── ring.svg
│ │ ├── x.svg
│ │ ├── line.svg
│ │ ├── graph.svg
│ │ ├── bar.svg
│ │ ├── scatter-plot.svg
│ │ ├── stacked-bar.svg
│ │ ├── stacked-area.svg
│ │ ├── area.svg
│ │ ├── Angular-Dimple-Logo.svg
│ │ └── front.svg
│ └── css
│ │ ├── base
│ │ ├── _reset.scss
│ │ ├── _buttons.scss
│ │ ├── _tabs.scss
│ │ ├── _code.scss
│ │ └── _config.scss
│ │ ├── examples.scss
│ │ └── style.scss
│ ├── examples
│ ├── partials
│ │ ├── animation-test.md
│ │ ├── bar-graph.md
│ │ ├── ring.md
│ │ ├── stacked-bar-graph.md
│ │ ├── area.md
│ │ ├── expanded-stacked-area.md
│ │ ├── homepage-code.md
│ │ ├── line-graph.md
│ │ ├── stacked-area.md
│ │ └── scatter-plot.md
│ └── index.html
│ ├── data
│ └── simple.json
│ ├── _banner.html
│ ├── documentation
│ ├── index.html
│ └── _content.md
│ ├── layouts
│ └── _layout.html
│ └── index.html
├── acetate.conf.js
├── test
├── protractor-conf.js
├── unit
│ ├── servicesSpec.js
│ ├── filtersSpec.js
│ ├── controllersSpec.js
│ └── directivesSpec.js
├── karma.conf.js
└── e2e
│ └── scenarios.js
├── lib
├── angular-dimple.js
├── r.js
├── bar.js
├── line.js
├── stacked-bar.js
├── legend.js
├── scatter-plot.js
├── stacked-area.js
├── area.js
├── ring.js
├── y.js
├── x.js
└── graph.js
├── bower.json
├── CHANGELOG.md
├── package.json
├── README.md
├── Gruntfile.js
├── dist
├── angular-dimple.min.js
└── angular-dimple.js
└── site
└── js
└── lib
└── angular-dimple.js
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | .grunt
3 | .sass-cache
4 | node_modules
5 | bower_components
6 | user.js
7 | docs/build
8 | angular-dimple.zip
9 | docs/source/assets/js/lib
10 |
--------------------------------------------------------------------------------
/docs/source/assets/js/directives.js:
--------------------------------------------------------------------------------
1 | angular.module('myApp.directives', [])
2 |
3 | .directive('appVersion', ['version', function(version) {
4 | return function(scope, elm, attrs) {
5 | elm.text(version);
6 | };
7 | }]);
--------------------------------------------------------------------------------
/docs/source/assets/js/filters.js:
--------------------------------------------------------------------------------
1 | angular.module('myApp.filters', [])
2 |
3 | .filter('interpolate', ['version', function(version) {
4 | return function(text) {
5 | return String(text).replace(/\%VERSION\%/mg, version);
6 | };
7 | }]);
8 |
--------------------------------------------------------------------------------
/acetate.conf.js:
--------------------------------------------------------------------------------
1 | module.exports = function (acetate) {
2 | acetate.global('config', {
3 | environment: 'dev'
4 | });
5 |
6 | acetate.layout('**/*', 'layouts/_layout:content');
7 | acetate.layout('posts/**/*', 'layouts/_post:post');
8 |
9 | acetate.options.src = 'docs/source';
10 | acetate.options.dest = 'docs/build';
11 | };
--------------------------------------------------------------------------------
/test/protractor-conf.js:
--------------------------------------------------------------------------------
1 | exports.config = {
2 | allScriptsTimeout: 11000,
3 |
4 | specs: [
5 | 'e2e/*.js'
6 | ],
7 |
8 | capabilities: {
9 | 'browserName': 'chrome'
10 | },
11 |
12 | baseUrl: 'http://localhost:8000/app/',
13 |
14 | framework: 'jasmine',
15 |
16 | jasmineNodeOpts: {
17 | defaultTimeoutInterval: 30000
18 | }
19 | };
20 |
--------------------------------------------------------------------------------
/test/unit/servicesSpec.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /* jasmine specs for services go here */
4 |
5 | describe('service', function() {
6 | beforeEach(module('myApp.services'));
7 |
8 |
9 | describe('version', function() {
10 | it('should return current version', inject(function(version) {
11 | expect(version).toEqual('0.1');
12 | }));
13 | });
14 | });
15 |
--------------------------------------------------------------------------------
/docs/source/assets/js/services.js:
--------------------------------------------------------------------------------
1 | angular.module('myApp.services', [])
2 |
3 | .service('dataService', ['$http', function($http) {
4 | return {
5 | getData: function() {
6 | return $http.get('/angular-dimple/data/example_data.json');
7 | },
8 | getSimpleData: function() {
9 | return $http.get('/angular-dimple/data/simple.json');
10 | }
11 | };
12 | }]);
13 |
--------------------------------------------------------------------------------
/docs/source/examples/partials/animation-test.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: false
3 | ---
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
16 |
--------------------------------------------------------------------------------
/lib/angular-dimple.js:
--------------------------------------------------------------------------------
1 | angular.module('angular-dimple', [
2 | 'angular-dimple.graph',
3 | 'angular-dimple.legend',
4 | 'angular-dimple.x',
5 | 'angular-dimple.y',
6 | 'angular-dimple.r',
7 | 'angular-dimple.line',
8 | 'angular-dimple.bar',
9 | 'angular-dimple.stacked-bar',
10 | 'angular-dimple.area',
11 | 'angular-dimple.stacked-area',
12 | 'angular-dimple.scatter-plot',
13 | 'angular-dimple.ring'
14 | ])
15 |
16 | .constant('MODULE_VERSION', '0.0.1')
17 |
18 | .value('defaults', {
19 | foo: 'bar'
20 | });
--------------------------------------------------------------------------------
/test/unit/filtersSpec.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /* jasmine specs for filters go here */
4 |
5 | describe('filter', function() {
6 | beforeEach(module('myApp.filters'));
7 |
8 |
9 | describe('interpolate', function() {
10 | beforeEach(module(function($provide) {
11 | $provide.value('version', 'TEST_VER');
12 | }));
13 |
14 |
15 | it('should replace VERSION', inject(function(interpolateFilter) {
16 | expect(interpolateFilter('before %VERSION% after')).toEqual('before TEST_VER after');
17 | }));
18 | });
19 | });
20 |
--------------------------------------------------------------------------------
/test/unit/controllersSpec.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /* jasmine specs for controllers go here */
4 |
5 | describe('controllers', function(){
6 | beforeEach(module('myApp.controllers'));
7 |
8 |
9 | it('should ....', inject(function($controller) {
10 | //spec body
11 | var myCtrl1 = $controller('MyCtrl1', { $scope: {} });
12 | expect(myCtrl1).toBeDefined();
13 | }));
14 |
15 | it('should ....', inject(function($controller) {
16 | //spec body
17 | var myCtrl2 = $controller('MyCtrl2', { $scope: {} });
18 | expect(myCtrl2).toBeDefined();
19 | }));
20 | });
21 |
--------------------------------------------------------------------------------
/test/unit/directivesSpec.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /* jasmine specs for directives go here */
4 |
5 | describe('directives', function() {
6 | beforeEach(module('myApp.directives'));
7 |
8 | describe('app-version', function() {
9 | it('should print current version', function() {
10 | module(function($provide) {
11 | $provide.value('version', 'TEST_VER');
12 | });
13 | inject(function($compile, $rootScope) {
14 | var element = $compile('')($rootScope);
15 | expect(element.text()).toEqual('TEST_VER');
16 | });
17 | });
18 | });
19 | });
20 |
--------------------------------------------------------------------------------
/docs/source/assets/img/dots.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
--------------------------------------------------------------------------------
/docs/source/data/simple.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "Name": "Tom",
4 | "Height": 64,
5 | "Weight": 190,
6 | "Time": 1408406400000
7 | },{
8 | "Name": "Tom",
9 | "Height": 68,
10 | "Weight": 195,
11 | "Time": 1408579200000
12 | },{
13 | "Name": "Tom",
14 | "Height": 69,
15 | "Weight": 198,
16 | "Time": 1408665600000
17 | },{
18 | "Name": "Tom",
19 | "Height": 70,
20 | "Weight": 205,
21 | "Time": 1408752000000
22 | },{
23 | "Name": "Tom",
24 | "Height": 67,
25 | "Weight": 198,
26 | "Time": 1408838400000
27 | },{
28 | "Name": "Tom",
29 | "Height": 76,
30 | "Weight": 195,
31 | "Time": 1408924800000
32 | }
33 | ]
34 |
35 |
--------------------------------------------------------------------------------
/docs/source/assets/css/base/_reset.scss:
--------------------------------------------------------------------------------
1 | html {
2 | overflow-y: scroll;
3 | font-size: 100%;
4 | -webkit-text-size-adjust: 100%;
5 | -moz-text-size-adjust: 100%;
6 | -ms-text-size-adjust: 100%;
7 | }
8 |
9 | body {
10 | margin: 0;
11 | }
12 |
13 | // Reset HTML 5 Elements ---------------------------------------------------------------
14 |
15 | article,
16 | aside,
17 | details,
18 | figcaption,
19 | figure,
20 | footer,
21 | header,
22 | hgroup,
23 | nav,
24 | section,
25 | summary {
26 | display: block;
27 | }
28 |
29 | audio,
30 | canvas,
31 | video {
32 | display: inline-block;
33 | }
34 |
35 | audio:not([controls]) {
36 | display: none;
37 | height: 0;
38 | }
39 |
40 | [hidden] {
41 | display: none;
42 | }
43 |
44 | svg:not(:root) {
45 | overflow: hidden;
46 | }
47 |
--------------------------------------------------------------------------------
/test/karma.conf.js:
--------------------------------------------------------------------------------
1 | module.exports = function(config){
2 | config.set({
3 |
4 | basePath : '../',
5 |
6 | files : [
7 | 'app/bower_components/angular/angular.js',
8 | 'app/bower_components/angular-route/angular-route.js',
9 | 'app/bower_components/angular-mocks/angular-mocks.js',
10 | 'app/js/**/*.js',
11 | 'test/unit/**/*.js'
12 | ],
13 |
14 | autoWatch : true,
15 |
16 | frameworks: ['jasmine'],
17 |
18 | browsers : ['Chrome'],
19 |
20 | plugins : [
21 | 'karma-chrome-launcher',
22 | 'karma-firefox-launcher',
23 | 'karma-jasmine',
24 | 'karma-junit-reporter'
25 | ],
26 |
27 | junitReporter : {
28 | outputFile: 'test_out/unit.xml',
29 | suite: 'unit'
30 | }
31 |
32 | });
33 | };
34 |
--------------------------------------------------------------------------------
/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "angular-dimple",
3 | "version": "2.0.0",
4 | "main": "dist/angular-dimple.js",
5 | "homepage": "http://esripdx.github.io/angular-dimple/",
6 | "authors": [
7 | "Paul C Pederson ",
8 | "Nik Wise "
9 | ],
10 | "description": "A mini-library of Angular directives for charting",
11 | "keywords": [
12 | "Angular",
13 | "Dimple",
14 | "charts",
15 | "graphs",
16 | "directives"
17 | ],
18 | "license": "ISC",
19 | "ignore": [
20 | "**/.*",
21 | "node_modules",
22 | "bower_components",
23 | "documentation",
24 | "source",
25 | "test",
26 | "site"
27 | ],
28 | "dependencies": {
29 | "d3": "~3.4.8",
30 | "dimple": "~2.1.0",
31 | "typecabinet": "~0.0.2",
32 | "viewport-grid": "*",
33 | "rye": "~0.0.1"
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/lib/r.js:
--------------------------------------------------------------------------------
1 | angular.module('angular-dimple.r', [])
2 |
3 | .directive('r', [function () {
4 | return {
5 | restrict: 'E',
6 | replace: true,
7 | require: ['r', '^graph'],
8 | controller: ['$scope', '$element', '$attrs', function($scope, $element, $attrs) {
9 | }],
10 | link: function($scope, $element, $attrs, $controllers) {
11 | var graphController = $controllers[1];
12 | var chart = graphController.getChart();
13 |
14 | function addAxis () {
15 | r = chart.addMeasureAxis('p', $attrs.field);
16 |
17 | if ($attrs.title && $attrs.title !== "null") {
18 | r.title = $attrs.title;
19 | } else if ($attrs.title == "null") {
20 | r.title = null;
21 | }
22 | }
23 |
24 | $scope.$watch('data', function(newValue, oldValue) {
25 | if (newValue) {
26 | addAxis();
27 | }
28 | });
29 | }
30 | };
31 | }]);
--------------------------------------------------------------------------------
/lib/bar.js:
--------------------------------------------------------------------------------
1 | angular.module('angular-dimple.bar', [])
2 |
3 | .directive('bar', [function () {
4 | return {
5 | restrict: 'E',
6 | replace: true,
7 | require: ['bar', '^graph'],
8 | controller: ['$scope', '$element', '$attrs', function($scope, $element, $attrs) {
9 | }],
10 | link: function($scope, $element, $attrs, $controllers) {
11 | var graphController = $controllers[1];
12 | var lineController = $controllers[0];
13 | var chart = graphController.getChart();
14 |
15 | function addBar () {
16 | var filteredData;
17 | bar = chart.addSeries([$attrs.field], dimple.plot.bar);
18 | graphController.filter($attrs);
19 | graphController.draw();
20 | }
21 |
22 |
23 |
24 | $scope.$watch('dataReady', function(newValue, oldValue) {
25 | if (newValue === true) {
26 | addBar();
27 | }
28 | });
29 | }
30 | };
31 | }]);
--------------------------------------------------------------------------------
/lib/line.js:
--------------------------------------------------------------------------------
1 | angular.module('angular-dimple.line', [])
2 |
3 | .directive('line', [function () {
4 | return {
5 | restrict: 'E',
6 | replace: true,
7 | require: ['line', '^graph'],
8 | controller: ['$scope', '$element', '$attrs', function($scope, $element, $attrs) {
9 | }],
10 | link: function($scope, $element, $attrs, $controllers) {
11 | var graphController = $controllers[1];
12 | var chart = graphController.getChart();
13 | var drawn = false;
14 |
15 | function addLine () {
16 | var filteredData;
17 | line = chart.addSeries([$attrs.field], dimple.plot.line);
18 | graphController.filter($attrs);
19 | line.lineMarkers = true;
20 | graphController.draw();
21 | }
22 |
23 | $scope.$watch('dataReady', function(newValue, oldValue) {
24 | if (newValue === true) {
25 | addLine();
26 | }
27 | });
28 |
29 | }
30 | };
31 | }]);
--------------------------------------------------------------------------------
/docs/source/assets/img/y.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
15 |
16 |
--------------------------------------------------------------------------------
/docs/source/assets/img/legend.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Angular-Dimple Changelog
2 |
3 | ## v2.0.1
4 | * Add dist files to releases so bower can find it
5 |
6 | ## v.2.0.0
7 | * Change