Skip to content

Commit 20f3205

Browse files
committed
Clean up demo
1 parent 7004efe commit 20f3205

File tree

2 files changed

+0
-74
lines changed

2 files changed

+0
-74
lines changed

src/app/app.component.html

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,3 @@
1-
<!-- <div>
2-
<h3>Simple Chart</h3>
3-
<zingchart-angular
4-
#chart1
5-
[config]="config"
6-
[height]="200"
7-
(complete)="onComplete($event)"
8-
(node_click)="nodeClick($event)">
9-
</zingchart-angular>
10-
11-
<button (click)="getData()">Fetch Data</button>
12-
<hr>
13-
14-
<h3>Dynamic Chart</h3>
15-
<zingchart-angular [config]="dynamicConfig" [series]="series"></zingchart-angular>
16-
17-
<hr>
18-
19-
<h3>Maps Chart</h3>
20-
<zingchart-angular [config]="mapsConfig" [height]="500"></zingchart-angular>
21-
</div> -->
22-
231
<nav class="navbar">
242
<h1>
253
<a [routerLink]="['/']">ZingChart Angular Playground</a>

src/app/app.component.ts

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -9,57 +9,5 @@ import 'zingchart/modules-es6/zingchart-maps-usa.min.js';
99
styleUrls: ['./app.component.css']
1010
})
1111
export class AppComponent {
12-
@ViewChild('chart1', { static: false }) chart1: any;
13-
14-
interval: any;
1512
title = 'zing-app';
16-
config = {
17-
type: 'line',
18-
series: [{
19-
values: [3,4,5,5,6,7,5,3]
20-
}]
21-
};
22-
dynamicConfig = {
23-
type: 'area',
24-
};
25-
mapsConfig = {
26-
shapes: [
27-
{
28-
type: 'zingchart.maps',
29-
options: {
30-
name: 'usa',
31-
ignore: ['AK', 'HI']
32-
}
33-
}
34-
]
35-
};
36-
series = [{
37-
alpha: 1,
38-
values: [2,3,5,5],
39-
}];
40-
41-
getData() {
42-
console.log('Fetching zingchart config object', this.chart1.getdata());
43-
};
44-
45-
nodeClick(event: Event) {
46-
console.log('zingchart node clicked test!', event);
47-
}
48-
49-
onComplete(event: Event) {
50-
console.log('Fetching zingchart config object', this.chart1.getdata());
51-
}
52-
53-
ngOnDestroy() {
54-
window.clearTimeout(this.interval);
55-
}
56-
57-
ngAfterContentInit() {
58-
this.interval = setInterval(() => {
59-
this.series = [{
60-
alpha: 1,
61-
values: [5,11,15,25].map(val => Math.floor(Math.random() * val)),
62-
}]
63-
}, 2000)
64-
}
6513
}

0 commit comments

Comments
 (0)