2016-05-11 17:38:01 +03:00
|
|
|
import {Component, ViewEncapsulation} from '@angular/core';
|
2016-05-04 11:49:36 +03:00
|
|
|
import {BaCard} from '../../../../theme/components';
|
2016-05-03 19:16:13 +03:00
|
|
|
|
2016-05-13 10:39:59 +03:00
|
|
|
import {ChartistJsService} from './chartistJs.service';
|
2016-05-12 18:36:51 +03:00
|
|
|
import {BaChartistChart} from '../../../../theme/components';
|
2016-05-03 19:16:13 +03:00
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
|
selector: 'chartist-js',
|
2016-05-13 10:39:59 +03:00
|
|
|
encapsulation: ViewEncapsulation.None,
|
2016-05-03 19:16:13 +03:00
|
|
|
pipes: [],
|
|
|
|
|
providers: [ChartistJsService],
|
2016-05-12 18:36:51 +03:00
|
|
|
directives: [BaCard, BaChartistChart],
|
2016-05-13 10:39:59 +03:00
|
|
|
styles: [require('chartist/dist/chartist.css'), require('./chartistJs.scss')],
|
2016-05-03 19:16:13 +03:00
|
|
|
template: require('./chartistJs.html'),
|
|
|
|
|
})
|
2016-05-12 18:36:51 +03:00
|
|
|
|
2016-05-03 19:16:13 +03:00
|
|
|
export class ChartistJs {
|
|
|
|
|
|
2016-05-13 10:39:59 +03:00
|
|
|
data:any;
|
2016-05-03 19:16:13 +03:00
|
|
|
|
|
|
|
|
constructor(private _chartistJsService:ChartistJsService) {
|
|
|
|
|
}
|
2016-05-03 19:33:39 +03:00
|
|
|
|
2016-05-13 10:39:59 +03:00
|
|
|
ngOnInit() {
|
|
|
|
|
this.data = this._chartistJsService.getAll();
|
|
|
|
|
}
|
2016-05-03 19:33:39 +03:00
|
|
|
|
|
|
|
|
getResponsive(padding, offset) {
|
2016-05-13 10:39:59 +03:00
|
|
|
return this._chartistJsService.getResponsive(padding, offset);
|
2016-05-03 19:33:39 +03:00
|
|
|
}
|
2016-05-03 19:16:13 +03:00
|
|
|
}
|