/
app.module.ts
79 lines (75 loc) · 2.68 KB
/
app.module.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import {
ChartsModule,
BaseChartDirective,
monkeyPatchChartJsLegend,
monkeyPatchChartJsTooltip
} from 'ng2-charts';
import { RouterModule, Route } from '@angular/router';
import { AppComponent } from './app.component';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { MaterialModule } from './material/material.module';
import { MarkdownModule } from 'ngx-markdown';
import { HttpClient, HttpClientModule } from '@angular/common/http';
import { LineChartComponent } from './line-chart/line-chart.component';
import { BarChartComponent } from './bar-chart/bar-chart.component';
import { DoughnutChartComponent } from './doughnut-chart/doughnut-chart.component';
import { RadarChartComponent } from './radar-chart/radar-chart.component';
import { PieChartComponent } from './pie-chart/pie-chart.component';
import { PolarAreaChartComponent } from './polar-area-chart/polar-area-chart.component';
import { DynamicChartComponent } from './dynamic-chart/dynamic-chart.component';
import { ChartHostComponent } from './chart-host/chart-host.component';
import { HighlightModule } from 'ngx-highlightjs';
import typescript from 'highlight.js/lib/languages/typescript';
import xml from 'highlight.js/lib/languages/xml';
import { BubbleChartComponent } from './bubble-chart/bubble-chart.component';
import * as pluginDataLabels from 'chartjs-plugin-datalabels';
import { ScatterChartComponent } from './scatter-chart/scatter-chart.component';
import { FinancialChartComponent } from './financial-chart/financial-chart.component';
const routes: Route[] = [];
export function hljsLanguages() {
return [
{ name: 'typescript', func: typescript },
// { name: 'html', func: html },
// {name: 'scss', func: scss},
{ name: 'xml', func: xml }
];
}
@NgModule({
declarations: [
AppComponent,
LineChartComponent,
BarChartComponent,
DoughnutChartComponent,
RadarChartComponent,
PieChartComponent,
PolarAreaChartComponent,
DynamicChartComponent,
ChartHostComponent,
BubbleChartComponent,
ScatterChartComponent,
FinancialChartComponent,
],
imports: [
BrowserModule,
RouterModule.forRoot(routes),
ChartsModule,
BrowserAnimationsModule,
MaterialModule,
HttpClientModule,
MarkdownModule.forRoot({ loader: HttpClient }),
HighlightModule.forRoot({
languages: hljsLanguages,
})
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule {
constructor() {
BaseChartDirective.unregisterPlugin(pluginDataLabels);
monkeyPatchChartJsLegend();
monkeyPatchChartJsTooltip();
}
}