Skip to content

Commit 8119829

Browse files
committed
docs(angular): stackblitz examples free
1 parent 88e17a8 commit 8119829

File tree

184 files changed

+1636
-1589
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

184 files changed

+1636
-1589
lines changed

angular/docs/charts/examples/charts01.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Component, DestroyRef, inject } from '@angular/core';
2+
import { type ChartData } from 'chart.js';
23
import { ChartjsComponent } from '@coreui/angular-chartjs';
3-
import { ChartData } from 'chart.js';
44

55
@Component({
66
selector: 'docs-charts01',

angular/docs/charts/examples/charts02.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Component } from '@angular/core';
2+
import { type ChartData } from 'chart.js';
23
import { ChartjsComponent } from '@coreui/angular-chartjs';
34

45
@Component({
@@ -8,8 +9,7 @@ import { ChartjsComponent } from '@coreui/angular-chartjs';
89
imports: [ChartjsComponent]
910
})
1011
export class Charts02Component {
11-
12-
data = {
12+
data: ChartData = {
1313
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
1414
datasets: [
1515
{

angular/docs/charts/examples/charts03.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Component } from '@angular/core';
2+
import { type ChartData } from 'chart.js';
23
import { ChartjsComponent } from '@coreui/angular-chartjs';
3-
import { ChartData } from 'chart.js';
44

55
@Component({
66
selector: 'docs-charts03',
@@ -9,7 +9,7 @@ import { ChartData } from 'chart.js';
99
imports: [ChartjsComponent]
1010
})
1111
export class Charts03Component {
12-
data: ChartData<'radar'> = {
12+
data: ChartData = {
1313
labels: ['Eating', 'Drinking', 'Sleeping', 'Designing', 'Coding', 'Cycling', 'Running'],
1414
datasets: [
1515
{
Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Component } from '@angular/core';
2+
import { type ChartData } from 'chart.js';
23
import { ChartjsComponent } from '@coreui/angular-chartjs';
34

45
@Component({
@@ -8,12 +9,13 @@ import { ChartjsComponent } from '@coreui/angular-chartjs';
89
imports: [ChartjsComponent]
910
})
1011
export class Charts04Component {
11-
12-
data = {
12+
data: ChartData = {
1313
labels: ['VueJs', 'EmberJs', 'ReactJs', 'Angular'],
14-
datasets: [{
15-
backgroundColor: ['#41B883', '#E46651', '#00D8FF', '#DD1B16'],
16-
data: [40, 20, 80, 10]
17-
}]
14+
datasets: [
15+
{
16+
backgroundColor: ['#41B883', '#E46651', '#00D8FF', '#DD1B16'],
17+
data: [40, 20, 80, 10]
18+
}
19+
]
1820
};
1921
}

angular/docs/charts/examples/charts05.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Component } from '@angular/core';
2+
import { type ChartData } from 'chart.js';
23
import { ChartjsComponent } from '@coreui/angular-chartjs';
34

45
@Component({
@@ -8,8 +9,7 @@ import { ChartjsComponent } from '@coreui/angular-chartjs';
89
imports: [ChartjsComponent]
910
})
1011
export class Charts05Component {
11-
12-
data = {
12+
data: ChartData = {
1313
labels: ['Red', 'Green', 'Yellow', 'Grey', 'Blue'],
1414
datasets: [
1515
{
Lines changed: 52 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Component } from '@angular/core';
2+
import { type ChartData } from 'chart.js';
23
import { ChartjsComponent } from '@coreui/angular-chartjs';
34

45
@Component({
@@ -8,44 +9,56 @@ import { ChartjsComponent } from '@coreui/angular-chartjs';
89
imports: [ChartjsComponent]
910
})
1011
export class Charts06Component {
11-
12-
data = {
13-
datasets: [{
14-
label: 'First Dataset',
15-
data: [{
16-
x: 20,
17-
y: 30,
18-
r: 15
19-
}, {
20-
x: 40,
21-
y: 10,
22-
r: 10
23-
}],
24-
backgroundColor: 'rgb(255, 99, 132)'
25-
}, {
26-
label: 'Second Dataset',
27-
data: [{
28-
x: 18,
29-
y: 26,
30-
r: 27
31-
}, {
32-
x: 23,
33-
y: 16,
34-
r: 42
35-
}],
36-
backgroundColor: 'rgb(99,138,255)'
37-
}, {
38-
label: 'Third Dataset',
39-
data: [{
40-
x: 27,
41-
y: 22,
42-
r: 9
43-
}, {
44-
x: 26,
45-
y: 18,
46-
r: 24
47-
}],
48-
backgroundColor: 'rgb(71,208,66)'
49-
}]
12+
data: ChartData = {
13+
datasets: [
14+
{
15+
label: 'First Dataset',
16+
data: [
17+
{
18+
x: 20,
19+
y: 30,
20+
r: 15
21+
},
22+
{
23+
x: 40,
24+
y: 10,
25+
r: 10
26+
}
27+
],
28+
backgroundColor: 'rgb(255, 99, 132)'
29+
},
30+
{
31+
label: 'Second Dataset',
32+
data: [
33+
{
34+
x: 18,
35+
y: 26,
36+
r: 27
37+
},
38+
{
39+
x: 23,
40+
y: 16,
41+
r: 42
42+
}
43+
],
44+
backgroundColor: 'rgb(99,138,255)'
45+
},
46+
{
47+
label: 'Third Dataset',
48+
data: [
49+
{
50+
x: 27,
51+
y: 22,
52+
r: 9
53+
},
54+
{
55+
x: 26,
56+
y: 18,
57+
r: 24
58+
}
59+
],
60+
backgroundColor: 'rgb(71,208,66)'
61+
}
62+
]
5063
};
5164
}
Lines changed: 50 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Component } from '@angular/core';
2+
import { type ChartData } from 'chart.js';
23
import { ChartjsComponent } from '@coreui/angular-chartjs';
34

45
@Component({
@@ -8,43 +9,54 @@ import { ChartjsComponent } from '@coreui/angular-chartjs';
89
imports: [ChartjsComponent]
910
})
1011
export class Charts07Component {
11-
12-
data = {
13-
datasets: [{
14-
label: 'Scatter Dataset 1',
15-
data: [{
16-
x: -10,
17-
y: 0
18-
}, {
19-
x: 0,
20-
y: 10
21-
}, {
22-
x: 10,
23-
y: 5
24-
}, {
25-
x: 0.5,
26-
y: 5.5
27-
}],
28-
borderColor: 'rgb(222,99,156)',
29-
backgroundColor: 'rgb(231,25,69)'
30-
}, {
31-
label: 'Scatter Dataset 2',
32-
data: [{
33-
x: -1,
34-
y: 6
35-
}, {
36-
x: -4,
37-
y: 7
38-
}, {
39-
x: 9,
40-
y: 4
41-
}, {
42-
x: 0.7,
43-
y: 1.7
44-
}],
45-
borderColor: 'rgb(133,178,56)',
46-
backgroundColor: 'rgb(124,213,17)'
47-
}]
12+
data: ChartData = {
13+
datasets: [
14+
{
15+
label: 'Scatter Dataset 1',
16+
data: [
17+
{
18+
x: -10,
19+
y: 0
20+
},
21+
{
22+
x: 0,
23+
y: 10
24+
},
25+
{
26+
x: 10,
27+
y: 5
28+
},
29+
{
30+
x: 0.5,
31+
y: 5.5
32+
}
33+
],
34+
borderColor: 'rgb(222,99,156)',
35+
backgroundColor: 'rgb(231,25,69)'
36+
},
37+
{
38+
label: 'Scatter Dataset 2',
39+
data: [
40+
{
41+
x: -1,
42+
y: 6
43+
},
44+
{
45+
x: -4,
46+
y: 7
47+
},
48+
{
49+
x: 9,
50+
y: 4
51+
},
52+
{
53+
x: 0.7,
54+
y: 1.7
55+
}
56+
],
57+
borderColor: 'rgb(133,178,56)',
58+
backgroundColor: 'rgb(124,213,17)'
59+
}
60+
]
4861
};
49-
5062
}

angular/docs/charts/index.html

Lines changed: 11 additions & 11 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)