Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ECharts: support tree shaking #2001

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { MatIconModule } from '@angular/material/icon';

import { ComponentDetailsModule } from '../../../../components/shared/component-details/component-details.module';

import { CovalentBaseEchartsModule } from '@covalent/echarts/base';
import { CovalentBaseEchartsModule, TD_ECHARTS_CONFIG } from '@covalent/echarts/base';
import { CovalentLineEchartsModule } from '@covalent/echarts/line';
import { CovalentBarEchartsModule } from '@covalent/echarts/bar';
import { CovalentTooltipEchartsModule } from '@covalent/echarts/tooltip';
Expand All @@ -17,6 +17,8 @@ import { DocumentationToolsModule } from '../../../../documentation-tools';
import { BarBasicSharedModule } from './demos/bar-demo-basic/bar-demo-basic.shared';
import { BarDemoBasicComponent } from './demos/bar-demo-basic/bar-demo-basic.component';

import * as echarts from 'echarts';

const routes: Routes = setEchartRoutes({
overviewDemoComponent: BarDemoBasicComponent,
id: 'bar',
Expand All @@ -30,7 +32,9 @@ const routes: Routes = setEchartRoutes({
MatSelectModule,
MatIconModule,
// Covalent Echarts
CovalentBaseEchartsModule,
CovalentBaseEchartsModule.forRoot({
echarts
}),
CovalentLineEchartsModule,
CovalentBarEchartsModule,
CovalentTooltipEchartsModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@ import { CovalentBarEchartsModule } from '@covalent/echarts/bar';
import { CovalentTooltipEchartsModule } from '@covalent/echarts/tooltip';
import { CovalentToolboxEchartsModule } from '@covalent/echarts/toolbox';
import { BarDemoBasicComponent } from './bar-demo-basic.component';
import * as echarts from 'echarts';

@NgModule({
declarations: [BarDemoBasicComponent],
imports: [
/** Covalent Modules */
CovalentBaseEchartsModule,
CovalentBaseEchartsModule.forRoot({
echarts,
}),
CovalentBarEchartsModule,
CovalentTooltipEchartsModule,
CovalentToolboxEchartsModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { BarBasicSharedModule } from './bar-demo-basic/bar-demo-basic.shared';
import { BarDemoComponent } from './bar-demo.component';
import { BarDemoRoutingModule } from './bar-demo-routing.module';
import { DemoModule } from '../../../../../components/shared/demo-tools/demo.module';
import * as echarts from 'echarts';

@NgModule({
declarations: [BarDemoComponent],
Expand All @@ -22,7 +23,9 @@ import { DemoModule } from '../../../../../components/shared/demo-tools/demo.mod
DemoModule,
BarDemoRoutingModule,
/** Covalent Modules */
CovalentBaseEchartsModule,
CovalentBaseEchartsModule.forRoot({
echarts,
}),
CovalentLineEchartsModule,
CovalentBarEchartsModule,
CovalentTooltipEchartsModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { CovalentToolboxEchartsModule } from '@covalent/echarts/toolbox';
import { setEchartRoutes } from '../../echarts-content';
import { TypesCombinationComponent } from './combination.component';
import { DocumentationToolsModule } from '../../../../documentation-tools';
import * as echarts from 'echarts';

const routes: Routes = setEchartRoutes({
overviewDemoComponent: TypesCombinationComponent,
Expand All @@ -27,7 +28,9 @@ const routes: Routes = setEchartRoutes({
MatSelectModule,
MatIconModule,
// Covalent Echarts
CovalentBaseEchartsModule,
CovalentBaseEchartsModule.forRoot({
echarts,
}),
CovalentLineEchartsModule,
CovalentBarEchartsModule,
CovalentTooltipEchartsModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,17 @@ import { CombinationDemoBasicComponent } from './combination-demo-basic/combinat
import { CombinationDemoComponent } from './combination-demo.component';
import { CombinationDemoRoutingModule } from './combination-demo-routing.module';
import { DemoModule } from '../../../../../components/shared/demo-tools/demo.module';
import * as echarts from 'echarts';

@NgModule({
declarations: [CombinationDemoComponent, CombinationDemoBasicComponent],
imports: [
DemoModule,
CombinationDemoRoutingModule,
/** Covalent Modules */
CovalentBaseEchartsModule,
CovalentBaseEchartsModule.forRoot({
echarts,
}),
CovalentLineEchartsModule,
CovalentBarEchartsModule,
CovalentTooltipEchartsModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,17 @@ import { GraphDemoBasicComponent } from './graph-demo-basic/graph-demo-basic.com
import { GraphDemoComponent } from './graph-demo.component';
import { GraphDemoRoutingModule } from './graph-demo-routing.module';
import { CovalentGraphEchartsModule } from '@covalent/echarts/graph';
import * as echarts from 'echarts';

@NgModule({
declarations: [GraphDemoBasicComponent, GraphDemoComponent],
imports: [
DemoModule,
GraphDemoRoutingModule,
/** Covalent Modules */
CovalentBaseEchartsModule,
CovalentBaseEchartsModule.forRoot({
echarts,
}),
CovalentTooltipEchartsModule,
CovalentToolboxEchartsModule,
CovalentGraphEchartsModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { CovalentTooltipEchartsModule } from '@covalent/echarts/tooltip';
import { setEchartRoutes } from '../../echarts-content';
import { DocumentationToolsModule } from '../../../../documentation-tools';
import { TypesGraphComponent } from './graph.component';
import * as echarts from 'echarts';

const routes: Routes = setEchartRoutes({
overviewDemoComponent: TypesGraphComponent,
Expand All @@ -26,7 +27,9 @@ const routes: Routes = setEchartRoutes({
MatSelectModule,
MatIconModule,
// Covalent Echarts
CovalentBaseEchartsModule,
CovalentBaseEchartsModule.forRoot({
echarts,
}),
CovalentGraphEchartsModule,
CovalentTooltipEchartsModule,
// Docs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,17 @@ import { LineDemoComponent } from './line-demo.component';
import { LineDemoRoutingModule } from './line-demo-routing.module';
import { LineDemoBasicComponent } from './line-demo-basic/line-demo-basic.component';
import { CovalentLineEchartsModule } from '@covalent/echarts/line';
import * as echarts from 'echarts';

@NgModule({
declarations: [LineDemoComponent, LineDemoBasicComponent],
imports: [
DemoModule,
LineDemoRoutingModule,
/** Covalent Modules */
CovalentBaseEchartsModule,
CovalentBaseEchartsModule.forRoot({
echarts,
}),
CovalentTooltipEchartsModule,
CovalentToolboxEchartsModule,
CovalentLineEchartsModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { CovalentTooltipEchartsModule } from '@covalent/echarts/tooltip';
import { setEchartRoutes } from '../../echarts-content';
import { DocumentationToolsModule } from '../../../../documentation-tools';
import { TypesLineComponent } from './line.component';
import * as echarts from 'echarts';

const routes: Routes = setEchartRoutes({
overviewDemoComponent: TypesLineComponent,
Expand All @@ -25,7 +26,9 @@ const routes: Routes = setEchartRoutes({
MatSelectModule,
MatIconModule,
// Covalent Echarts
CovalentBaseEchartsModule,
CovalentBaseEchartsModule.forRoot({
echarts,
}),
CovalentLineEchartsModule,
CovalentTooltipEchartsModule,
// Docs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@ import { CovalentBaseEchartsModule } from '@covalent/echarts/base';
import { CovalentTooltipEchartsModule } from '@covalent/echarts/tooltip';
import { MapDemoBasicComponent } from './map-demo-basic.component';
import { CovalentMapEchartsModule } from '@covalent/echarts/map';
import * as echarts from 'echarts';

@NgModule({
declarations: [MapDemoBasicComponent],
imports: [
/** Covalent Modules */
CovalentBaseEchartsModule,
CovalentBaseEchartsModule.forRoot({
echarts,
}),
CovalentMapEchartsModule,
CovalentTooltipEchartsModule,
/** Angular Modules */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { MapDemoRoutingModule } from './map-demo-routing.module';
import { DemoModule } from '../../../../../components/shared/demo-tools/demo.module';
import { CovalentMapEchartsModule } from '@covalent/echarts/map';
import { MapBasicSharedModule } from './map-demo-basic/map-demo-basic.shared';
import * as echarts from 'echarts';

@NgModule({
declarations: [MapDemoComponent],
Expand All @@ -22,7 +23,9 @@ import { MapBasicSharedModule } from './map-demo-basic/map-demo-basic.shared';
DemoModule,
MapDemoRoutingModule,
/** Covalent Modules */
CovalentBaseEchartsModule,
CovalentBaseEchartsModule.forRoot({
echarts,
}),
CovalentLineEchartsModule,
CovalentMapEchartsModule,
CovalentTooltipEchartsModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,17 @@ import { CovalentPieEchartsModule } from '@covalent/echarts/pie';
import { PieDemoBasicComponent } from './pie-demo-basic/pie-demo-basic.component';
import { PieDemoComponent } from './pie-demo.component';
import { PieDemoRoutingModule } from './pie-demo-routing.module';
import * as echarts from 'echarts';

@NgModule({
declarations: [PieDemoBasicComponent, PieDemoComponent],
imports: [
DemoModule,
PieDemoRoutingModule,
/** Covalent Modules */
CovalentBaseEchartsModule,
CovalentBaseEchartsModule.forRoot({
echarts,
}),
CovalentTooltipEchartsModule,
CovalentToolboxEchartsModule,
CovalentPieEchartsModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { CovalentPieEchartsModule } from '@covalent/echarts/pie';
import { setEchartRoutes } from '../../echarts-content';
import { DocumentationToolsModule } from '../../../../documentation-tools';
import { TypesPieComponent } from './pie.component';
import * as echarts from 'echarts';

const routes: Routes = setEchartRoutes({
overviewDemoComponent: TypesPieComponent,
Expand All @@ -26,7 +27,9 @@ const routes: Routes = setEchartRoutes({
MatSelectModule,
MatIconModule,
// Covalent Echarts
CovalentBaseEchartsModule,
CovalentBaseEchartsModule.forRoot({
echarts,
}),
CovalentPieEchartsModule,
CovalentTooltipEchartsModule,
CovalentToolboxEchartsModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,17 @@ import { SankeyDemoBasicComponent } from './sankey-demo-basic/sankey-demo-basic.
import { SankeyDemoComponent } from './sankey-demo.component';
import { SankeyDemoRoutingModule } from './sankey-demo-routing.module';
import { CovalentSankeyEchartsModule } from '@covalent/echarts/sankey';
import * as echarts from 'echarts';

@NgModule({
declarations: [SankeyDemoBasicComponent, SankeyDemoComponent],
imports: [
DemoModule,
SankeyDemoRoutingModule,
/** Covalent Modules */
CovalentBaseEchartsModule,
CovalentBaseEchartsModule.forRoot({
echarts,
}),
CovalentTooltipEchartsModule,
CovalentToolboxEchartsModule,
CovalentSankeyEchartsModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { CovalentSankeyEchartsModule } from '@covalent/echarts/sankey';
import { setEchartRoutes } from '../../echarts-content';
import { DocumentationToolsModule } from '../../../../documentation-tools';
import { TypesSankeyComponent } from './sankey.component';
import * as echarts from 'echarts';

const routes: Routes = setEchartRoutes({
overviewDemoComponent: TypesSankeyComponent,
Expand All @@ -25,7 +26,9 @@ const routes: Routes = setEchartRoutes({
MatSelectModule,
MatIconModule,
// Covalent Echarts
CovalentBaseEchartsModule,
CovalentBaseEchartsModule.forRoot({
echarts,
}),
CovalentSankeyEchartsModule,
CovalentTooltipEchartsModule,
// Docs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,17 @@ import { ScatterDemoBasicComponent } from './scatter-demo-basic/scatter-demo-bas
import { ScatterDemoComponent } from './scatter-demo.component';
import { ScatterDemoRoutingModule } from './scatter-demo-routing.module';
import { DemoModule } from '../../../../../components/shared/demo-tools/demo.module';
import * as echarts from 'echarts';

@NgModule({
declarations: [ScatterDemoComponent, ScatterDemoBasicComponent],
imports: [
DemoModule,
ScatterDemoRoutingModule,
/** Covalent Modules */
CovalentBaseEchartsModule,
CovalentBaseEchartsModule.forRoot({
echarts,
}),
CovalentTooltipEchartsModule,
CovalentToolboxEchartsModule,
CovalentScatterEchartsModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { CovalentScatterEchartsModule } from '@covalent/echarts/scatter';
import { setEchartRoutes } from '../../echarts-content';
import { DocumentationToolsModule } from '../../../../documentation-tools';
import { TypesScatterComponent } from './scatter.component';
import * as echarts from 'echarts';

const routes: Routes = setEchartRoutes({
overviewDemoComponent: TypesScatterComponent,
Expand All @@ -25,7 +26,9 @@ const routes: Routes = setEchartRoutes({
MatSelectModule,
MatIconModule,
// Covalent Echarts
CovalentBaseEchartsModule,
CovalentBaseEchartsModule.forRoot({
echarts,
}),
CovalentScatterEchartsModule,
CovalentTooltipEchartsModule,
// Docs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@ import { CovalentToolboxEchartsModule } from '@covalent/echarts/toolbox';
import { CovalentTreeEchartsModule } from '@covalent/echarts/tree';

import { TreeDemoBasicComponent } from './tree-demo-basic.component';
import * as echarts from 'echarts';

@NgModule({
declarations: [TreeDemoBasicComponent],
imports: [
/** Covalent Modules */
CovalentBaseEchartsModule,
CovalentBaseEchartsModule.forRoot({
echarts,
}),
CovalentTooltipEchartsModule,
CovalentToolboxEchartsModule,
CovalentTreeEchartsModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { TreeDemoComponent } from './tree-demo.component';
import { TreeDemoRoutingModule } from './tree-demo-routing.module';
import { DemoModule } from '../../../../../components/shared/demo-tools/demo.module';
import { TreeBasicSharedModule } from './tree-demo-basic/tree-demo-basic.shared';
import * as echarts from 'echarts';

@NgModule({
declarations: [TreeDemoComponent],
Expand All @@ -21,7 +22,9 @@ import { TreeBasicSharedModule } from './tree-demo-basic/tree-demo-basic.shared'
DemoModule,
TreeDemoRoutingModule,
/** Covalent Modules */
CovalentBaseEchartsModule,
CovalentBaseEchartsModule.forRoot({
echarts,
}),
CovalentTooltipEchartsModule,
CovalentToolboxEchartsModule,
CovalentTreeEchartsModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { DocumentationToolsModule } from '../../../../documentation-tools';
import { TreeBasicSharedModule } from './demos/tree-demo-basic/tree-demo-basic.shared';
import { TreeDemoBasicComponent } from './demos/tree-demo-basic/tree-demo-basic.component';
import { ComponentDetailsModule } from '../../../../components/shared/component-details/component-details.module';
import * as echarts from 'echarts';

const routes: Routes = setEchartRoutes({
overviewDemoComponent: TreeDemoBasicComponent,
Expand All @@ -26,7 +27,9 @@ const routes: Routes = setEchartRoutes({
MatSelectModule,
MatIconModule,
// Covalent Echarts
CovalentBaseEchartsModule,
CovalentBaseEchartsModule.forRoot({
echarts,
}),
CovalentTreeEchartsModule,
CovalentTooltipEchartsModule,
// Docs
Expand Down
Loading