mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-16 23:40:14 +01:00
users map on top of amchart component
This commit is contained in:
parent
55fd4e476f
commit
d9939d10b8
4 changed files with 7 additions and 14 deletions
|
|
@ -1,26 +1,21 @@
|
|||
import {Component, ViewEncapsulation} from 'angular2/core';
|
||||
|
||||
import './usersMap.loader.ts';
|
||||
import {UsersMapService} from './usersMap.service';
|
||||
import {BaAmChart} from '../../../theme/components';
|
||||
|
||||
@Component({
|
||||
selector: 'users-map',
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
providers: [UsersMapService],
|
||||
directives: [BaAmChart],
|
||||
styles: [require('./usersMap.scss')],
|
||||
template: require('./usersMap.html')
|
||||
})
|
||||
export class UsersMap {
|
||||
|
||||
mapData:Object;
|
||||
|
||||
constructor(private _usersMapService:UsersMapService) {
|
||||
}
|
||||
|
||||
ngAfterViewInit() {
|
||||
this._loadUsersMap();
|
||||
}
|
||||
|
||||
// TODO: load proper AmCharts theme
|
||||
private _loadUsersMap() {
|
||||
AmCharts.makeChart('amChartMap', this._usersMapService.getData());
|
||||
this.mapData = this._usersMapService.getData();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
<div id="amChartMap"></div>
|
||||
<ba-am-chart baAmChartClass="dashboard-users-map" [baAmChartConfiguration]="mapData"></ba-am-chart>
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
require('ammap3');
|
||||
require('ammap3/ammap/maps/js/worldLow');
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
#amChartMap {
|
||||
.dashboard-users-map {
|
||||
width: 100%;
|
||||
height: 315px;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue