@@ -6,6 +6,7 @@ import { ServiceWorkerModule } from '@angular/service-worker';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
|
||||
import { AlertModule } from 'ngx-bootstrap';
|
||||
import { NgxChartsModule } from '@swimlane/ngx-charts';
|
||||
|
||||
import { environment } from '@env/environment';
|
||||
import { CoreModule } from '@app/core';
|
||||
@@ -28,6 +29,7 @@ import { NavigationModule } from './navigation/navigation.module';
|
||||
TranslateModule.forRoot(),
|
||||
NgbModule.forRoot(),
|
||||
AlertModule.forRoot(),
|
||||
NgxChartsModule,
|
||||
CoreModule,
|
||||
SharedModule,
|
||||
HomeModule,
|
||||
|
||||
@@ -57,14 +57,14 @@
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#"><h5 class="font-weight-normal">Groups</h5></a>
|
||||
</li>
|
||||
<div ngbDropdown class="d-inline-block">
|
||||
<a class="nav-link" id="dropdownBasic2" ngbDropdownToggle>Toggle dropup</a>
|
||||
<li ngbDropdown class="nav-item dropdown d-inline-block">
|
||||
<div class="nav-link" id="dropdownBasic2" ngbDropdownToggle>Toggle dropup</div>
|
||||
<div ngbDropdownMenu aria-labelledby="dropdownBasic2">
|
||||
<button class="dropdown-item">Action - 1</button>
|
||||
<button class="dropdown-item">Another Action</button>
|
||||
<button class="dropdown-item">Something else is here</button>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
<form class="form-inline my-2 my-lg-0">
|
||||
|
||||
@@ -0,0 +1,113 @@
|
||||
<div class="fluid-container">
|
||||
<div class="container">
|
||||
<div class="row mt-5">
|
||||
<div class="col-sm-4">
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">Recent Activities </div>
|
||||
<div class="card-body">
|
||||
<div class="list-group">
|
||||
<a href="#" class="list-group-item list-group-item-action active">
|
||||
Cras justo odio
|
||||
</a>
|
||||
<a href="#" class="list-group-item list-group-item-action">Dapibus ac facilisis in
|
||||
</a>
|
||||
<a href="#" class="list-group-item list-group-item-action disabled">Morbi leo risus
|
||||
</a>
|
||||
<a href="#" class="list-group-item list-group-item-action">
|
||||
Cras justo odio
|
||||
</a>
|
||||
<a href="#" class="list-group-item list-group-item-action">Dapibus ac facilisis in
|
||||
</a>
|
||||
<a href="#" class="list-group-item list-group-item-action disabled">Morbi leo risus
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">Frequent Activities </div>
|
||||
<div class="card-body">
|
||||
<div class="list-group">
|
||||
<a href="#" class="list-group-item list-group-item-action">
|
||||
Cras justo odio
|
||||
</a>
|
||||
<a href="#" class="list-group-item list-group-item-action">Dapibus ac facilisis in
|
||||
</a>
|
||||
<a href="#" class="list-group-item list-group-item-action">Morbi leo risus
|
||||
</a>
|
||||
<a href="#" class="list-group-item list-group-item-action ">
|
||||
Cras justo odio
|
||||
</a>
|
||||
<a href="#" class="list-group-item list-group-item-action">Dapibus ac facilisis in
|
||||
</a>
|
||||
<a href="#" class="list-group-item list-group-item-action">Morbi leo risus
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">Amount distributed </div>
|
||||
<div class="card-body">
|
||||
<div class="list-group">
|
||||
<a href="#" class="list-group-item list-group-item-action">
|
||||
Cras justo odio
|
||||
</a>
|
||||
<a href="#" class="list-group-item list-group-item-action">Dapibus ac facilisis in
|
||||
</a>
|
||||
<a href="#" class="list-group-item list-group-item-action">Morbi leo risus
|
||||
</a>
|
||||
<a href="#" class="list-group-item list-group-item-action ">
|
||||
Cras justo odio
|
||||
</a>
|
||||
<a href="#" class="list-group-item list-group-item-action">Dapibus ac facilisis in
|
||||
</a>
|
||||
<a href="#" class="list-group-item list-group-item-action ">Morbi leo risus
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-5">
|
||||
<div class="col-sm-8 mx-auto">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<ngx-charts-bar-vertical
|
||||
[view]="view"
|
||||
[scheme]="colorScheme"
|
||||
[results]="single"
|
||||
[gradient]="gradient"
|
||||
[xAxis]="showXAxis"
|
||||
[yAxis]="showYAxis"
|
||||
[showXAxisLabel]="showXAxisLabel"
|
||||
[showYAxisLabel]="showYAxisLabel"
|
||||
[xAxisLabel]="xAxisLabel"
|
||||
[yAxisLabel]="yAxisLabel">
|
||||
</ngx-charts-bar-vertical>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="col-sm-4 ">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="ngx-charts">
|
||||
<ngx-charts-pie-chart
|
||||
[view]="view"
|
||||
[scheme]="colorScheme"
|
||||
[results]="single"></ngx-charts-pie-chart>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,5 @@
|
||||
|
||||
.ngx-charts {
|
||||
position: relative;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
/* tslint:disable:no-unused-variable */
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { DebugElement } from '@angular/core';
|
||||
|
||||
import { DashboardComponent } from './dashboard.component';
|
||||
|
||||
describe('DashboardComponent', () => {
|
||||
let component: DashboardComponent;
|
||||
let fixture: ComponentFixture<DashboardComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ DashboardComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(DashboardComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,37 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { NgxChartsModule } from '@swimlane/ngx-charts';
|
||||
import { single } from './data';
|
||||
|
||||
@Component({
|
||||
selector: 'app-dashboard',
|
||||
templateUrl: './dashboard.component.html',
|
||||
styleUrls: ['./dashboard.component.scss']
|
||||
})
|
||||
export class DashboardComponent implements OnInit {
|
||||
single: any[];
|
||||
multi: any[];
|
||||
|
||||
view: any[] = [600, 350];
|
||||
|
||||
// options
|
||||
showXAxis = true;
|
||||
showYAxis = true;
|
||||
gradient = false;
|
||||
showLegend = true;
|
||||
showXAxisLabel = true;
|
||||
xAxisLabel = 'Country';
|
||||
showYAxisLabel = true;
|
||||
yAxisLabel = 'Population';
|
||||
|
||||
colorScheme = {
|
||||
domain: ['#5AA454', '#A10A28', '#C7B42C', '#AAAAAA']
|
||||
};
|
||||
constructor() {
|
||||
Object.assign(this, { single });
|
||||
}
|
||||
ngOnInit() {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
export const single = [
|
||||
{
|
||||
'name': 'Germany',
|
||||
'value': 89400001
|
||||
},
|
||||
{
|
||||
'name': 'USA',
|
||||
'value': 5000000
|
||||
},
|
||||
{
|
||||
'name': 'France',
|
||||
'value': 7200000
|
||||
}
|
||||
];
|
||||
|
||||
export const multi = [
|
||||
{
|
||||
'name': 'Germany',
|
||||
'series': [
|
||||
{
|
||||
'name': '2010',
|
||||
'value': 7300000
|
||||
},
|
||||
{
|
||||
'name': '2011',
|
||||
'value': 8940000
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
'name': 'USA',
|
||||
'series': [
|
||||
{
|
||||
'name': '2010',
|
||||
'value': 7870000
|
||||
},
|
||||
{
|
||||
'name': '2011',
|
||||
'value': 8270000
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
'name': 'France',
|
||||
'series': [
|
||||
{
|
||||
'name': '2010',
|
||||
'value': 5000002
|
||||
},
|
||||
{
|
||||
'name': '2011',
|
||||
'value': 5800000
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
@@ -3,11 +3,13 @@ import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { Route, extract } from '@app/core';
|
||||
import { HomeComponent } from './home.component';
|
||||
import { DashboardComponent } from './dashboard/dashboard.component';
|
||||
|
||||
const routes: Routes = [
|
||||
Route.withShell([
|
||||
{ path: '', redirectTo: '/home', pathMatch: 'full' },
|
||||
{ path: 'home', component: HomeComponent, data: { title: extract('Home') } }
|
||||
{ path: 'home', component: HomeComponent, data: { title: extract('Home') } },
|
||||
{ path: 'home/dashboard', component: DashboardComponent}
|
||||
])
|
||||
];
|
||||
|
||||
|
||||
@@ -1,24 +1,28 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { NgxChartsModule } from '@swimlane/ngx-charts';
|
||||
|
||||
import { CoreModule } from '@app/core';
|
||||
import { SharedModule } from '@app/shared';
|
||||
import { HomeRoutingModule } from './home-routing.module';
|
||||
import { HomeComponent } from './home.component';
|
||||
import { QuoteService } from './quote.service';
|
||||
import { DashboardComponent } from './dashboard/dashboard.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
TranslateModule,
|
||||
NgxChartsModule,
|
||||
CoreModule,
|
||||
SharedModule,
|
||||
HomeRoutingModule
|
||||
],
|
||||
declarations: [
|
||||
HomeComponent
|
||||
],
|
||||
HomeComponent,
|
||||
DashboardComponent
|
||||
],
|
||||
providers: [
|
||||
QuoteService
|
||||
]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@import "src/theme/theme-variables";
|
||||
@import "../../theme/theme-variables";
|
||||
@import "~bootstrap/scss/mixins/_breakpoints";
|
||||
|
||||
.login-container {
|
||||
|
||||
Reference in New Issue
Block a user