Skip to content

Commit 06673ab

Browse files
committed
[新增] 增加模型化的饼图/直角系图的图形数据,为Awade图形可视化配置做准备
1 parent 27a3e83 commit 06673ab

File tree

12 files changed

+1558
-10
lines changed

12 files changed

+1558
-10
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"ng": "ng",
77
"start": "ng serve --poll 500 --proxy-config proxy-config.json",
88
"build": "ng build -prod -aot --delete-output-path",
9-
"test": "ng test",
9+
"test": "ng test --code-coverage",
1010
"lint": "ng lint",
1111
"e2e": "ng e2e"
1212
},

src/app/demo/editable-box/monitor/demo.component.spec.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
import { TestBed, async } from '@angular/core/testing';
22

3-
import { AppComponent } from './demo.component';
3+
import { MonitorComponent } from './demo.component';
44

55
describe('AppComponent', () => {
66
beforeEach(async(() => {
77
TestBed.configureTestingModule({
88
declarations: [
9-
AppComponent
9+
MonitorComponent
1010
],
1111
}).compileComponents();
1212
}));
1313

1414
it('should create the app', async(() => {
15-
const fixture = TestBed.createComponent(AppComponent);
15+
const fixture = TestBed.createComponent(MonitorComponent);
1616
const app = fixture.debugElement.componentInstance;
1717
expect(app).toBeTruthy();
1818
}));
1919

2020
it(`should have as title 'app'`, async(() => {
21-
const fixture = TestBed.createComponent(AppComponent);
21+
const fixture = TestBed.createComponent(MonitorComponent);
2222
const app = fixture.debugElement.componentInstance;
2323
expect(app.title).toEqual('ADMA Monitor');
2424
}));
2525

2626
it('should render title in a h1 tag', async(() => {
27-
const fixture = TestBed.createComponent(AppComponent);
27+
const fixture = TestBed.createComponent(MonitorComponent);
2828
fixture.detectChanges();
2929
const compiled = fixture.debugElement.nativeElement;
3030
expect(compiled.querySelector('h1').textContent).toContain('Welcome to ADMA Monitor!!');

src/jigsaw/core/data/echart-types.ts

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export class EchartOptions {
88

99
export class EchartTitle {
1010
//TODO: 补充完整
11-
text: string;
11+
text?: string;
1212
subtext?: string;
1313
left?: string | number;
1414
right?: string | number;
@@ -18,15 +18,27 @@ export class EchartTitle {
1818
[prop:string]: any;
1919
}
2020

21+
export class EchartXAxis {
22+
[prop:string]: any;
23+
}
24+
25+
export class EchartYAxis {
26+
[prop:string]: any;
27+
}
28+
2129
export class GraphLegendItem {
2230
name?: string;
2331
icon?: string;
2432
[prop:string]: any;
2533
}
2634

35+
export class EchartToolbox {
36+
[prop:string]: any;
37+
}
38+
2739
export class EchartLegend {
2840
//TODO: 补充完整
29-
data: Array<GraphLegendItem|string>;
41+
data?: Array<GraphLegendItem|string>;
3042
left?: string | number;
3143
right?: string | number;
3244
top?: string | number;
@@ -43,6 +55,6 @@ export class EchartTooltip {
4355
}
4456

4557
export class EchartSeriesItem {
46-
data: any[];
58+
data?: any[];
4759
[prop:string]: any;
4860
}

0 commit comments

Comments
 (0)