-
Notifications
You must be signed in to change notification settings - Fork 129
/
Copy pathchart-axes-multiple.component.ts
45 lines (38 loc) · 1.46 KB
/
chart-axes-multiple.component.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// >> chart-angular-axes-multiple-component
import { Component, OnInit } from '@angular/core';
import { DataService } from '../../data-services/data.service';
import { Country } from '../../data-services/country';
import { ObservableArray } from "tns-core-modules/data/observable-array";
import { LinearAxis } from "nativescript-ui-chart";
@Component({
moduleId: module.id,
selector: 'tk-chart-axes-multiple.component',
providers: [DataService],
templateUrl: 'chart-axes-multiple.component.html'
})
export class ChartAxesMultipleComponent implements OnInit {
private _rateA: ObservableArray<Country>;
private _rateB: ObservableArray<Country>;
private _rateC: ObservableArray<Country>;
private _total: ObservableArray<Country>;
constructor(private _dataService: DataService) { }
ngOnInit() {
this._rateA = new ObservableArray(this._dataService.getRateA());
this._rateB = new ObservableArray(this._dataService.getRateB());
this._rateC = new ObservableArray(this._dataService.getRateC());
this._total = new ObservableArray(this._dataService.getTotal());
}
get rateA(): ObservableArray<Country> {
return this._rateA;
}
get rateB(): ObservableArray<Country> {
return this._rateB;
}
get rateC(): ObservableArray<Country> {
return this._rateC;
}
get total(): ObservableArray<Country> {
return this._total;
}
}
// << chart-angular-axes-multiple-component