Skip to content

Commit

Permalink
chore(): prettify echarts code (#1459)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ed Morales committed Jul 26, 2019
1 parent aa06774 commit e2fc638
Show file tree
Hide file tree
Showing 67 changed files with 4,723 additions and 5,261 deletions.
9 changes: 2 additions & 7 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -504,13 +504,8 @@
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/platform/echarts/tsconfig.lib.json",
"src/platform/echarts/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
"tsConfig": ["src/platform/echarts/tsconfig.lib.json", "src/platform/echarts/tsconfig.spec.json"],
"exclude": ["**/node_modules/**"]
}
}
}
Expand Down
6 changes: 4 additions & 2 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@ export class DocsAppComponent {
icon: 'picture_in_picture',
route: 'components',
title: 'Components & Addons',
}, {
},
{
icon: 'show_chart',
route: 'echarts',
title: 'Echarts',
}, {
},
{
icon: 'view_quilt',
route: 'layouts',
title: 'Layouts',
Expand Down
2 changes: 1 addition & 1 deletion src/app/app.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const routes: Routes = [
{
// preload: true loads the module immediately
path: '',
data: { preload: true, },
data: { preload: true },
loadChildren: './components/echarts/components.module#ComponentsModule',
},
{
Expand Down
7 changes: 1 addition & 6 deletions src/app/components/echarts/atomic/atomic.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ import { AtomicDatasetComponent } from './dataset/dataset.component';
DocumentationToolsModule,
moduleRoutes,
],
declarations: [
AtomicTooltipComponent,
AtomicAxisComponent,
AtomicToolboxComponent,
AtomicDatasetComponent,
],
declarations: [AtomicTooltipComponent, AtomicAxisComponent, AtomicToolboxComponent, AtomicDatasetComponent],
})
export class AtomicModule {}
9 changes: 2 additions & 7 deletions src/app/components/echarts/atomic/axis/axis.component.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import {
Component,
ChangeDetectionStrategy,
} from '@angular/core';
import { Component, ChangeDetectionStrategy } from '@angular/core';

@Component({
selector: 'atomic-axis',
Expand All @@ -10,6 +7,4 @@ import {
changeDetection: ChangeDetectionStrategy.OnPush,
preserveWhitespaces: true,
})
export class AtomicAxisComponent {

}
export class AtomicAxisComponent {}
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import {
Component,
ChangeDetectionStrategy,
} from '@angular/core';
import { Component, ChangeDetectionStrategy } from '@angular/core';

@Component({
selector: 'atomic-tooltip',
Expand All @@ -10,6 +7,4 @@ import {
changeDetection: ChangeDetectionStrategy.OnPush,
preserveWhitespaces: true,
})
export class AtomicTooltipComponent {

}
export class AtomicTooltipComponent {}
9 changes: 2 additions & 7 deletions src/app/components/echarts/chart/chart.component.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import {
Component,
ChangeDetectionStrategy,
} from '@angular/core';
import { Component, ChangeDetectionStrategy } from '@angular/core';

@Component({
selector: 'chart',
Expand All @@ -10,6 +7,4 @@ import {
changeDetection: ChangeDetectionStrategy.OnPush,
preserveWhitespaces: true,
})
export class ChartComponent {

}
export class ChartComponent {}
8 changes: 3 additions & 5 deletions src/app/components/echarts/components.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import { tdCollapseAnimation, tdRotateAnimation, tdFadeInOutAnimation } from '@c
animations: [tdCollapseAnimation, tdRotateAnimation, tdFadeInOutAnimation],
})
export class ComponentsComponent {

miniNav: boolean = false;

routes: Object[] = [
Expand Down Expand Up @@ -78,7 +77,8 @@ export class ComponentsComponent {
title: 'Axis',
},
{
description: 'Toolbox options for refreshing, saving chart as an image, data zoom, data view and on the fly chart types.',
description:
'Toolbox options for refreshing, saving chart as an image, data zoom, data view and on the fly chart types.',
icon: 'art_track',
route: ['atomic', 'toolbox'],
title: 'Toolbox',
Expand All @@ -92,9 +92,7 @@ export class ComponentsComponent {
},
];

constructor(public media: TdMediaService,
private _changeDetectorRef: ChangeDetectorRef) {
}
constructor(public media: TdMediaService, private _changeDetectorRef: ChangeDetectorRef) {}

toggleMiniNav(): void {
this.miniNav = !this.miniNav;
Expand Down
7 changes: 1 addition & 6 deletions src/app/components/echarts/components.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,6 @@ import { moduleRoutes } from './components.routes';
DocumentationToolsModule,
moduleRoutes,
],
declarations: [
ComponentsComponent,
OverviewComponent,
GettingStartedComponent,
ChartComponent,
],
declarations: [ComponentsComponent, OverviewComponent, GettingStartedComponent, ChartComponent],
})
export class ComponentsModule {}
15 changes: 10 additions & 5 deletions src/app/components/echarts/components.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,24 @@ const routes: Routes = [
{
component: ComponentsComponent,
path: 'echarts',
children: [{
children: [
{
component: OverviewComponent,
path: '',
}, {
},
{
path: 'getting-started',
component: GettingStartedComponent,
}, {
},
{
path: 'chart',
component: ChartComponent,
}, {
},
{
path: 'types',
loadChildren: './types/types.module#TypesModule',
}, {
},
{
path: 'atomic',
loadChildren: './atomic/atomic.module#AtomicModule',
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import {
Component,
ChangeDetectionStrategy,
} from '@angular/core';
import { Component, ChangeDetectionStrategy } from '@angular/core';

@Component({
selector: 'getting-started',
Expand All @@ -10,6 +7,4 @@ import {
changeDetection: ChangeDetectionStrategy.OnPush,
preserveWhitespaces: true,
})
export class GettingStartedComponent {

}
export class GettingStartedComponent {}
156 changes: 77 additions & 79 deletions src/app/components/echarts/overview/overview.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,87 +6,85 @@ import { TdMediaService } from '@covalent/core/media';
templateUrl: './overview.component.html',
styleUrls: ['./overview.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,

})
export class OverviewComponent {
items: Object[] = [
{
color: 'deep-purple-A700',
icon: 'insert_chart',
route: ['types', 'bar'],
title: 'Bar Chart',
},
{
color: 'blue-A700',
icon: 'show_chart',
route: ['types', 'line'],
title: 'Line Chart',
},
{
color: 'teal-A700',
icon: 'bubble_chart',
route: ['types', 'scatter'],
title: 'Scatter Chart',
},
{
color: 'pink-A700',
icon: 'multiline_chart',
route: ['types', 'combination'],
title: 'Combination Chart',
},
{
color: 'amber-A700',
icon: 'share',
route: ['types', 'tree'],
title: 'Tree Chart',
},
{
color: 'green-A700',
icon: 'dashboard',
route: ['types', 'treemap'],
title: 'Treemap Chart',
},
{
color: 'yellow-A700',
icon: 'call_split',
route: ['types', 'sankey'],
title: 'Sankey Chart',
},
{
color: 'orange-A700',
icon: 'grain',
route: ['types', 'graph'],
title: 'Graph Chart',
},
];

items: Object[] = [{
color: 'deep-purple-A700',
icon: 'insert_chart',
route: ['types', 'bar'],
title: 'Bar Chart',
},
{
color: 'blue-A700',
icon: 'show_chart',
route: ['types', 'line'],
title: 'Line Chart',
},
{
color: 'teal-A700',
icon: 'bubble_chart',
route: ['types', 'scatter'],
title: 'Scatter Chart',
},
{
color: 'pink-A700',
icon: 'multiline_chart',
route: ['types', 'combination'],
title: 'Combination Chart',
},
{
color: 'amber-A700',
icon: 'share',
route: ['types', 'tree'],
title: 'Tree Chart',
},
{
color: 'green-A700',
icon: 'dashboard',
route: ['types', 'treemap'],
title: 'Treemap Chart',
},
{
color: 'yellow-A700',
icon: 'call_split',
route: ['types', 'sankey'],
title: 'Sankey Chart',
},
{
color: 'orange-A700',
icon: 'grain',
route: ['types', 'graph'],
title: 'Graph Chart',
},
];

atomicComponents: Object[] = [
{
color: 'deep-orange-A700',
icon: 'info',
route: ['atomic', 'tooltip'],
title: 'Tooltip',
},
{
color: 'lime-A700',
icon: 'trending_flat',
route: ['atomic', 'axis'],
title: 'Axis',
},
{
color: 'cyan-500',
icon: 'art_track',
route: ['atomic', 'toolbox'],
title: 'Toolbox',
},
{
color: 'purple-500',
icon: 'view_list',
route: ['atomic', 'dataset'],
title: 'Dataset',
},
];

constructor(public media: TdMediaService) { }
atomicComponents: Object[] = [
{
color: 'deep-orange-A700',
icon: 'info',
route: ['atomic', 'tooltip'],
title: 'Tooltip',
},
{
color: 'lime-A700',
icon: 'trending_flat',
route: ['atomic', 'axis'],
title: 'Axis',
},
{
color: 'cyan-500',
icon: 'art_track',
route: ['atomic', 'toolbox'],
title: 'Toolbox',
},
{
color: 'purple-500',
icon: 'view_list',
route: ['atomic', 'dataset'],
title: 'Dataset',
},
];

constructor(public media: TdMediaService) {}
}

0 comments on commit e2fc638

Please sign in to comment.