Removed Charts pages entirely

This commit is contained in:
Tom Bloor 2017-08-16 15:36:18 +01:00
parent 48b0e0c81f
commit 574b159f5e
5 changed files with 0 additions and 263 deletions

View file

@ -8,7 +8,6 @@ import { BsDropdownModule } from 'ngx-bootstrap/dropdown';
import { TabsModule } from 'ngx-bootstrap/tabs'; import { TabsModule } from 'ngx-bootstrap/tabs';
import { NAV_DROPDOWN_DIRECTIVES } from './shared/nav-dropdown.directive'; import { NAV_DROPDOWN_DIRECTIVES } from './shared/nav-dropdown.directive';
import { ChartsModule } from 'ng2-charts/ng2-charts';
import { SIDEBAR_TOGGLE_DIRECTIVES } from './shared/sidebar.directive'; import { SIDEBAR_TOGGLE_DIRECTIVES } from './shared/sidebar.directive';
import { AsideToggleDirective } from './shared/aside.directive'; import { AsideToggleDirective } from './shared/aside.directive';
import { BreadcrumbsComponent } from './shared/breadcrumb.component'; import { BreadcrumbsComponent } from './shared/breadcrumb.component';
@ -36,7 +35,6 @@ import { DashboardModule } from './dashboard/dashboard.module';
HttpModule, HttpModule,
BsDropdownModule.forRoot(), BsDropdownModule.forRoot(),
TabsModule.forRoot(), TabsModule.forRoot(),
ChartsModule,
AuthModule, AuthModule,
DashboardModule, DashboardModule,
// Loaded last to allow for 404 catchall // Loaded last to allow for 404 catchall

View file

@ -1,20 +0,0 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { ChartJSComponent } from './chartjs.component';
const routes: Routes = [
{
path: '',
component: ChartJSComponent,
data: {
title: 'Charts'
}
}
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class ChartJSRoutingModule {}

View file

@ -1,130 +0,0 @@
<div class="animated fadeIn">
<div class="card-columns cols-2">
<div class="card">
<div class="card-header">
Line Chart
<div class="card-actions">
<a href="http://www.chartjs.org">
<small class="text-muted">docs</small>
</a>
</div>
</div>
<div class="card-block">
<div class="chart-wrapper">
<canvas baseChart class="chart"
[datasets]="lineChartData"
[labels]="lineChartLabels"
[options]="lineChartOptions"
[colors]="lineChartColours"
[legend]="lineChartLegend"
[chartType]="lineChartType"
(chartHover)="chartHovered($event)"
(chartClick)="chartClicked($event)"></canvas>
</div>
</div>
</div>
<div class="card">
<div class="card-header">
Bar Chart
<div class="card-actions">
<a href="http://www.chartjs.org">
<small class="text-muted">docs</small>
</a>
</div>
</div>
<div class="card-block">
<div class="chart-wrapper">
<canvas baseChart class="chart"
[datasets]="barChartData"
[labels]="barChartLabels"
[options]="barChartOptions"
[legend]="barChartLegend"
[chartType]="barChartType"
(chartHover)="chartHovered($event)"
(chartClick)="chartClicked($event)"></canvas>
</div>
</div>
</div>
<div class="card">
<div class="card-header">
Doughnut Chart
<div class="card-actions">
<a href="http://www.chartjs.org">
<small class="text-muted">docs</small>
</a>
</div>
</div>
<div class="card-block">
<div class="chart-wrapper">
<canvas baseChart class="chart"
[data]="doughnutChartData"
[labels]="doughnutChartLabels"
[chartType]="doughnutChartType"
(chartHover)="chartHovered($event)"
(chartClick)="chartClicked($event)"></canvas>
</div>
</div>
</div>
<div class="card">
<div class="card-header">
Radar Chart
<div class="card-actions">
<a href="http://www.chartjs.org">
<small class="text-muted">docs</small>
</a>
</div>
</div>
<div class="card-block">
<div class="chart-wrapper">
<canvas baseChart class="chart"
[datasets]="radarChartData"
[labels]="radarChartLabels"
[chartType]="radarChartType"
(chartHover)="chartHovered($event)"
(chartClick)="chartClicked($event)"></canvas>
</div>
</div>
</div>
<div class="card">
<div class="card-header">
Pie Chart
<div class="card-actions">
<a href="http://www.chartjs.org">
<small class="text-muted">docs</small>
</a>
</div>
</div>
<div class="card-block">
<div class="chart-wrapper">
<canvas baseChart class="chart"
[data]="pieChartData"
[labels]="pieChartLabels"
[chartType]="pieChartType"
(chartHover)="chartHovered($event)"
(chartClick)="chartClicked($event)"></canvas>
</div>
</div>
</div>
<div class="card">
<div class="card-header">
Polar Area Chart
<div class="card-actions">
<a href="http://www.chartjs.org">
<small class="text-muted">docs</small>
</a>
</div>
</div>
<div class="card-block">
<div class="chart-wrapper">
<canvas baseChart class="chart"
[data]="polarAreaChartData"
[labels]="polarAreaChartLabels"
[legend]="polarAreaLegend"
[chartType]="polarAreaChartType"
(chartHover)="chartHovered($event)"
(chartClick)="chartClicked($event)"></canvas>
</div>
</div>
</div>
</div>
</div>

View file

@ -1,97 +0,0 @@
import { Component } from '@angular/core';
@Component({
templateUrl: 'chartjs.component.html'
})
export class ChartJSComponent {
// lineChart
public lineChartData: Array<any> = [
{data: [65, 59, 80, 81, 56, 55, 40], label: 'Series A'},
{data: [28, 48, 40, 19, 86, 27, 90], label: 'Series B'},
{data: [18, 48, 77, 9, 100, 27, 40], label: 'Series C'}
];
public lineChartLabels: Array<any> = ['January', 'February', 'March', 'April', 'May', 'June', 'July'];
public lineChartOptions: any = {
animation: false,
responsive: true
};
public lineChartColours: Array<any> = [
{ // grey
backgroundColor: 'rgba(148,159,177,0.2)',
borderColor: 'rgba(148,159,177,1)',
pointBackgroundColor: 'rgba(148,159,177,1)',
pointBorderColor: '#fff',
pointHoverBackgroundColor: '#fff',
pointHoverBorderColor: 'rgba(148,159,177,0.8)'
},
{ // dark grey
backgroundColor: 'rgba(77,83,96,0.2)',
borderColor: 'rgba(77,83,96,1)',
pointBackgroundColor: 'rgba(77,83,96,1)',
pointBorderColor: '#fff',
pointHoverBackgroundColor: '#fff',
pointHoverBorderColor: 'rgba(77,83,96,1)'
},
{ // grey
backgroundColor: 'rgba(148,159,177,0.2)',
borderColor: 'rgba(148,159,177,1)',
pointBackgroundColor: 'rgba(148,159,177,1)',
pointBorderColor: '#fff',
pointHoverBackgroundColor: '#fff',
pointHoverBorderColor: 'rgba(148,159,177,0.8)'
}
];
public lineChartLegend = true;
public lineChartType = 'line';
// barChart
public barChartOptions: any = {
scaleShowVerticalLines: false,
responsive: true
};
public barChartLabels: string[] = ['2006', '2007', '2008', '2009', '2010', '2011', '2012'];
public barChartType = 'bar';
public barChartLegend = true;
public barChartData: any[] = [
{data: [65, 59, 80, 81, 56, 55, 40], label: 'Series A'},
{data: [28, 48, 40, 19, 86, 27, 90], label: 'Series B'}
];
// Doughnut
public doughnutChartLabels: string[] = ['Download Sales', 'In-Store Sales', 'Mail-Order Sales'];
public doughnutChartData: number[] = [350, 450, 100];
public doughnutChartType = 'doughnut';
// Radar
public radarChartLabels: string[] = ['Eating', 'Drinking', 'Sleeping', 'Designing', 'Coding', 'Cycling', 'Running'];
public radarChartData: any = [
{data: [65, 59, 90, 81, 56, 55, 40], label: 'Series A'},
{data: [28, 48, 40, 19, 96, 27, 100], label: 'Series B'}
];
public radarChartType = 'radar';
// Pie
public pieChartLabels: string[] = ['Download Sales', 'In-Store Sales', 'Mail Sales'];
public pieChartData: number[] = [300, 500, 100];
public pieChartType = 'pie';
// PolarArea
public polarAreaChartLabels: string[] = ['Download Sales', 'In-Store Sales', 'Mail Sales', 'Telesales', 'Corporate Sales'];
public polarAreaChartData: number[] = [300, 500, 100, 40, 120];
public polarAreaLegend = true;
public polarAreaChartType = 'polarArea';
// events
public chartClicked(e: any): void {
console.log(e);
}
public chartHovered(e: any): void {
console.log(e);
}
}

View file

@ -1,14 +0,0 @@
import { NgModule } from '@angular/core';
import { ChartsModule } from 'ng2-charts/ng2-charts';
import { ChartJSComponent } from './chartjs.component';
import { ChartJSRoutingModule } from './chartjs-routing.module';
@NgModule({
imports: [
ChartJSRoutingModule,
ChartsModule
],
declarations: [ ChartJSComponent ]
})
export class ChartJSModule { }