From 1b08462bb9d2fb5c0123c9d545815d4e123a09a6 Mon Sep 17 00:00:00 2001 From: nixa <4dmitr@gmail.com> Date: Wed, 4 May 2016 16:04:14 +0300 Subject: [PATCH] pieChart component --- config/webpack.common.js | 1 + package.json | 1 + .../pages/dashboard/dashboard.component.ts | 3 +- src/app/pages/dashboard/dashboard.html | 6 ++ src/app/pages/dashboard/pieChart/index.ts | 1 + .../dashboard/pieChart/pieChart.component.ts | 79 +++++++++++++++++++ .../pages/dashboard/pieChart/pieChart.html | 17 ++++ .../pages/dashboard/pieChart/pieChart.scss | 74 +++++++++++++++++ 8 files changed, 181 insertions(+), 1 deletion(-) create mode 100644 src/app/pages/dashboard/pieChart/index.ts create mode 100644 src/app/pages/dashboard/pieChart/pieChart.component.ts create mode 100644 src/app/pages/dashboard/pieChart/pieChart.html create mode 100644 src/app/pages/dashboard/pieChart/pieChart.scss diff --git a/config/webpack.common.js b/config/webpack.common.js index b68aef5b..21d2df4e 100644 --- a/config/webpack.common.js +++ b/config/webpack.common.js @@ -233,6 +233,7 @@ module.exports = { "L": "leaflet", "Chart": "chart.js", "Chartist": "chartist", + "EasyPieChart": "easy-pie-chart" }) ], diff --git a/package.json b/package.json index 8ebdb035..2db74ce1 100644 --- a/package.json +++ b/package.json @@ -61,6 +61,7 @@ "bootstrap-loader": "^1.0.8", "chartist": "^0.9.7", "core-js": "^2.2.2", + "easy-pie-chart": "^2.1.7", "font-awesome": "^4.6.1", "font-awesome-sass-loader": "^1.0.1", "google-maps": "^3.2.1", diff --git a/src/app/pages/dashboard/dashboard.component.ts b/src/app/pages/dashboard/dashboard.component.ts index 2a1fd545..2a807659 100644 --- a/src/app/pages/dashboard/dashboard.component.ts +++ b/src/app/pages/dashboard/dashboard.component.ts @@ -1,13 +1,14 @@ import {Component, ViewEncapsulation} from 'angular2/core'; import {PopularApp} from './popularApp'; +import {PieChart} from './pieChart'; import {BaCard} from '../../theme/components'; @Component({ selector: 'dashboard', pipes: [], - directives: [PopularApp, BaCard], + directives: [PopularApp, PieChart, BaCard], encapsulation: ViewEncapsulation.None, styles: [require('./dashboard.scss')], template: require('./dashboard.html') diff --git a/src/app/pages/dashboard/dashboard.html b/src/app/pages/dashboard/dashboard.html index 51e0dc7f..30f4982d 100644 --- a/src/app/pages/dashboard/dashboard.html +++ b/src/app/pages/dashboard/dashboard.html @@ -1,3 +1,9 @@ +