diff --git a/src/app/app.menu.ts b/src/app/app.menu.ts index ed71ab2e..87e7ceb6 100644 --- a/src/app/app.menu.ts +++ b/src/app/app.menu.ts @@ -67,10 +67,6 @@ export const menuItems = [ expanded: false, order: 400, subMenu: [ - // { - // title: 'Chart Js', - // component: 'ChartJs', - // }, { title: 'Chartist.Js', component: 'ChartistJs', diff --git a/src/app/pages/charts/components/chartJs/chartJs.component.ts b/src/app/pages/charts/components/chartJs/chartJs.component.ts deleted file mode 100644 index 9d622bf2..00000000 --- a/src/app/pages/charts/components/chartJs/chartJs.component.ts +++ /dev/null @@ -1,71 +0,0 @@ -import {Component, ViewEncapsulation} from '@angular/core'; -import {BaCard} from '../../../../theme/components'; - -import {ChartJsService} from "./chartJs.service"; - -import {CHART_DIRECTIVES} from 'ng2-charts'; -import {chartColors} from "../../../../theme/theme.constants"; - -// TODO refactor after https://github.com/valor-software/ng2-charts/issues/186 is closed -@Component({ - selector: 'chart-js', - pipes: [], - providers: [ChartJsService], - encapsulation: ViewEncapsulation.None, - styles: [require('./chartJs.scss')], - directives: [BaCard, CHART_DIRECTIVES], - template: require('./chartJs.html'), -}) -export class ChartJs { - - public labels = { - one: ["Sleeping", "Designing", "Coding", "Cycling"], - two: ["April", "May", "June", "Jule", "August", "September", "October", "November", "December"], - three: ["May", "June", "Jule", "August", "September", "October", "November"] - }; - public data = { - one: [20, 40, 5, 35], - two: [[1, 9, 3, 4, 5, 6, 7, 8, 2].map((e) => {return Math.sin(e) * 25 + 25})], - three: [ - [65, 59, 90, 81, 56, 55, 40], - [28, 48, 40, 19, 88, 27, 45] - ] - }; - public series = ['Product A', 'Product B']; - public colours = chartColors; - public options = { - scaleShowLabelBackdrop : false, - segmentShowStroke : false, - responsive: true, - scaleFontColor: "rgba(255,255,255,.7)", - scaleLineColor: "rgba(255,255,255,.7)", - pointLabelFontColor: "rgba(255,255,255,.7)" - }; - - constructor(private _chartJsService:ChartJsService) { - } - - ngOnInit() { - // var self = this; - // setInterval(() => { - // - // var temp = [...this.data.two]; - // temp[0].unshift(temp[0].pop()); - // this.data.two = temp; - // - // }, 300); - } - - chartType(type) { - return type; - } - - changeData ($event) { - let shuffle = (o) => { - for(var j, x, i = o.length; i; j = Math.floor(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x){} - return o; - }; - - this.data = shuffle(this.data); - } -} diff --git a/src/app/pages/charts/components/chartJs/chartJs.html b/src/app/pages/charts/components/chartJs/chartJs.html deleted file mode 100644 index 118723eb..00000000 --- a/src/app/pages/charts/components/chartJs/chartJs.html +++ /dev/null @@ -1,66 +0,0 @@ -
-
- - - - -
- -
- - - - -
- -
- - - - -
-
- -
-
- - - - -
-
- - - - -
-
- -
-
- - - - -
-
- - - - -
-
- - - - -
-
diff --git a/src/app/pages/charts/components/chartJs/chartJs.scss b/src/app/pages/charts/components/chartJs/chartJs.scss deleted file mode 100644 index b3236b5a..00000000 --- a/src/app/pages/charts/components/chartJs/chartJs.scss +++ /dev/null @@ -1,56 +0,0 @@ -.chartjs { - display: block; - width: 100%; -} - -.chart-legend, -.bar-legend, -.line-legend, -.pie-legend, -.radar-legend, -.polararea-legend, -.doughnut-legend { - list-style-type: none; - margin-top: 5px; - text-align: center; - /* NOTE: Browsers automatically add 40px of padding-left to all lists, so we should offset that, otherwise the legend is off-center */ - -webkit-padding-start: 0; - /* Webkit */ - -moz-padding-start: 0; - /* Mozilla */ - padding-left: 0; - /* IE (handles all cases, really, but we should also include the vendor-specific properties just to be safe) */ -} - -.chart-legend li, -.bar-legend li, -.line-legend li, -.pie-legend li, -.radar-legend li, -.polararea-legend li, -.doughnut-legend li { - display: inline-block; - white-space: nowrap; - position: relative; - margin-bottom: 4px; - border-radius: 5px; - padding: 2px 8px 2px 28px; - font-size: smaller; - cursor: default; -} - -.chart-legend li span, -.bar-legend li span, -.line-legend li span, -.pie-legend li span, -.radar-legend li span, -.polararea-legend li span, -.doughnut-legend li span { - display: block; - position: absolute; - left: 0; - top: 0; - width: 20px; - height: 20px; - border-radius: 5px; -} diff --git a/src/app/pages/charts/components/chartJs/chartJs.service.ts b/src/app/pages/charts/components/chartJs/chartJs.service.ts deleted file mode 100644 index d3dadb5a..00000000 --- a/src/app/pages/charts/components/chartJs/chartJs.service.ts +++ /dev/null @@ -1,6 +0,0 @@ -import {Injectable} from '@angular/core'; - -@Injectable() -export class ChartJsService { - -} diff --git a/src/app/pages/charts/components/chartJs/index.ts b/src/app/pages/charts/components/chartJs/index.ts deleted file mode 100644 index c0eb3ccc..00000000 --- a/src/app/pages/charts/components/chartJs/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './chartJs.component';