hapus component yang tidak terpakai
This commit is contained in:
parent
70214c3ba3
commit
56ee41f4f3
|
@ -1,18 +0,0 @@
|
|||
<ngx-charts-bar-vertical-2d
|
||||
[view]="view"
|
||||
[scheme]="'flame'"
|
||||
[results]="multi"
|
||||
[gradient]="gradient"
|
||||
[xAxis]="showXAxis"
|
||||
[yAxis]="showYAxis"
|
||||
[legend]="showLegend"
|
||||
[legendPosition]="legendPosition"
|
||||
[showXAxisLabel]="showXAxisLabel"
|
||||
[showYAxisLabel]="showYAxisLabel"
|
||||
[xAxisLabel]="xAxisLabel"
|
||||
[yAxisLabel]="yAxisLabel"
|
||||
[legendTitle]="legendTitle"
|
||||
(select)="onSelect($event)"
|
||||
(activate)="onActivate($event)"
|
||||
(deactivate)="onDeactivate($event)">
|
||||
</ngx-charts-bar-vertical-2d>
|
|
@ -1,24 +0,0 @@
|
|||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { GroupedVerticalBarChartComponent } from './grouped-vertical-bar-chart.component';
|
||||
|
||||
describe('GroupedVerticalBarChartComponent', () => {
|
||||
let component: GroupedVerticalBarChartComponent;
|
||||
let fixture: ComponentFixture<GroupedVerticalBarChartComponent>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ GroupedVerticalBarChartComponent ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(GroupedVerticalBarChartComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
|
@ -1,91 +0,0 @@
|
|||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { LegendPosition, NgxChartsModule } from '@swimlane/ngx-charts';
|
||||
|
||||
@Component({
|
||||
selector: 'app-grouped-vertical-bar-chart',
|
||||
templateUrl: './grouped-vertical-bar-chart.component.html',
|
||||
styleUrls: ['./grouped-vertical-bar-chart.component.scss'],
|
||||
standalone: true,
|
||||
imports: [NgxChartsModule],
|
||||
})
|
||||
export class GroupedVerticalBarChartComponent implements OnInit {
|
||||
|
||||
// options
|
||||
showXAxis: boolean = true;
|
||||
showYAxis: boolean = true;
|
||||
gradient: boolean = true;
|
||||
showLegend: boolean = true;
|
||||
showXAxisLabel: boolean = true;
|
||||
xAxisLabel: string = 'Country';
|
||||
showYAxisLabel: boolean = true;
|
||||
yAxisLabel: string = 'Population';
|
||||
legendTitle: string = 'Years';
|
||||
@Input() view: any;
|
||||
@Input() legendPosition = LegendPosition.Right;
|
||||
|
||||
colorScheme: any = {
|
||||
domain: ['#5AA454', '#C7B42C', '#AAAAAA'],
|
||||
};
|
||||
|
||||
multi: any[] = [];
|
||||
|
||||
constructor() {}
|
||||
|
||||
ngOnInit() {
|
||||
this.multi = [
|
||||
{
|
||||
name: 'Germany',
|
||||
series: [
|
||||
{
|
||||
name: '2010',
|
||||
value: 7300000,
|
||||
},
|
||||
{
|
||||
name: '2011',
|
||||
value: 8940000,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
{
|
||||
name: 'USA',
|
||||
series: [
|
||||
{
|
||||
name: '2010',
|
||||
value: 7870000,
|
||||
},
|
||||
{
|
||||
name: '2011',
|
||||
value: 8270000,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
{
|
||||
name: 'France',
|
||||
series: [
|
||||
{
|
||||
name: '2010',
|
||||
value: 5000002,
|
||||
},
|
||||
{
|
||||
name: '2011',
|
||||
value: 5800000,
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
onSelect(data: any): void {
|
||||
console.log('Item clicked', JSON.parse(JSON.stringify(data)));
|
||||
}
|
||||
|
||||
onActivate(data: any): void {
|
||||
console.log('Activate', JSON.parse(JSON.stringify(data)));
|
||||
}
|
||||
|
||||
onDeactivate(data: any): void {
|
||||
console.log('Deactivate', JSON.parse(JSON.stringify(data)));
|
||||
}
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
<ngx-charts-bar-horizontal
|
||||
[view]="view"
|
||||
[scheme]="'picnic'"
|
||||
[results]="single"
|
||||
[gradient]="gradient"
|
||||
[xAxis]="showXAxis"
|
||||
[yAxis]="showYAxis"
|
||||
[legend]="showLegend"
|
||||
[legendPosition]="legendPosition"
|
||||
[showXAxisLabel]="showXAxisLabel"
|
||||
[showYAxisLabel]="showYAxisLabel"
|
||||
[xAxisLabel]="xAxisLabel"
|
||||
[yAxisLabel]="yAxisLabel"
|
||||
(select)="onSelect($event)"
|
||||
(activate)="onActivate($event)"
|
||||
(deactivate)="onDeactivate($event)">
|
||||
<!-- [scheme]="colorScheme" -->
|
||||
</ngx-charts-bar-horizontal>
|
|
@ -1,24 +0,0 @@
|
|||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { HorizontalBarChartComponent } from './horizontal-bar-chart.component';
|
||||
|
||||
describe('HorizontalBarChartComponent', () => {
|
||||
let component: HorizontalBarChartComponent;
|
||||
let fixture: ComponentFixture<HorizontalBarChartComponent>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ HorizontalBarChartComponent ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(HorizontalBarChartComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
|
@ -1,58 +0,0 @@
|
|||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { LegendPosition, NgxChartsModule } from '@swimlane/ngx-charts';
|
||||
|
||||
@Component({
|
||||
selector: 'app-horizontal-bar-chart',
|
||||
templateUrl: './horizontal-bar-chart.component.html',
|
||||
styleUrls: ['./horizontal-bar-chart.component.scss'],
|
||||
standalone: true,
|
||||
imports: [NgxChartsModule],
|
||||
})
|
||||
export class HorizontalBarChartComponent implements OnInit {
|
||||
// options
|
||||
showXAxis: boolean = true;
|
||||
showYAxis: boolean = true;
|
||||
gradient: boolean = false;
|
||||
showLegend: boolean = true;
|
||||
showXAxisLabel: boolean = true;
|
||||
yAxisLabel: string = 'Country';
|
||||
showYAxisLabel: boolean = true;
|
||||
xAxisLabel: string = 'Population';
|
||||
@Input() view: any;
|
||||
@Input() legendPosition = LegendPosition.Below;
|
||||
single: any[] = [];
|
||||
colorScheme: any = {
|
||||
domain: ['#5AA454', '#A10A28', '#C7B42C', '#AAAAAA'],
|
||||
};
|
||||
|
||||
constructor() {}
|
||||
|
||||
ngOnInit() {
|
||||
this.single = [
|
||||
{
|
||||
"name": "Germany",
|
||||
"value": 8940000
|
||||
},
|
||||
{
|
||||
"name": "USA",
|
||||
"value": 5000000
|
||||
},
|
||||
{
|
||||
"name": "France",
|
||||
"value": 7200000
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
onSelect(data: any): void {
|
||||
console.log('Item clicked', JSON.parse(JSON.stringify(data)));
|
||||
}
|
||||
|
||||
onActivate(data: any): void {
|
||||
console.log('Activate', JSON.parse(JSON.stringify(data)));
|
||||
}
|
||||
|
||||
onDeactivate(data: any): void {
|
||||
console.log('Deactivate', JSON.parse(JSON.stringify(data)));
|
||||
}
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
<ngx-charts-line-chart
|
||||
[view]="view"
|
||||
[scheme]="'neons'"
|
||||
[legend]="legend"
|
||||
[showXAxisLabel]="showXAxisLabel"
|
||||
[showYAxisLabel]="showYAxisLabel"
|
||||
[xAxis]="xAxis"
|
||||
[yAxis]="yAxis"
|
||||
[xAxisLabel]="xAxisLabel"
|
||||
[yAxisLabel]="yAxisLabel"
|
||||
[timeline]="timeline"
|
||||
[results]="multi"
|
||||
(select)="onSelect($event)"
|
||||
(activate)="onActivate($event)"
|
||||
(deactivate)="onDeactivate($event)"
|
||||
>
|
||||
</ngx-charts-line-chart>
|
|
@ -1,24 +0,0 @@
|
|||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { LineChartComponent } from './line-chart.component';
|
||||
|
||||
describe('LineChartComponent', () => {
|
||||
let component: LineChartComponent;
|
||||
let fixture: ComponentFixture<LineChartComponent>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ LineChartComponent ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(LineChartComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
|
@ -1,84 +0,0 @@
|
|||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { NgxChartsModule } from '@swimlane/ngx-charts';
|
||||
import { PengukuranService } from '../../services/pengukuran.service';
|
||||
import { Storage } from '@ionic/storage-angular';
|
||||
|
||||
@Component({
|
||||
selector: 'app-line-chart',
|
||||
templateUrl: './line-chart.component.html',
|
||||
styleUrls: ['./line-chart.component.scss'],
|
||||
standalone: true,
|
||||
imports: [NgxChartsModule],
|
||||
})
|
||||
export class LineChartComponent implements OnInit {
|
||||
|
||||
// options
|
||||
legend: boolean = true;
|
||||
showLabels: boolean = true;
|
||||
animations: boolean = true;
|
||||
xAxis: boolean = true;
|
||||
yAxis: boolean = true;
|
||||
showYAxisLabel: boolean = true;
|
||||
showXAxisLabel: boolean = true;
|
||||
xAxisLabel: string = 'INDIKATOR KESEHATAN INDIVIDU';
|
||||
yAxisLabel: string = 'Berat Badan';
|
||||
timeline: boolean = true;
|
||||
multi: any[] = [];
|
||||
@Input() view: any;
|
||||
colorScheme: any = {
|
||||
domain: ['#5AA454', '#E44D25', '#CFC0BB', '#7aa3e5', '#a8385d', '#aae3f5']
|
||||
};
|
||||
|
||||
constructor(
|
||||
private pengukuranService: PengukuranService,
|
||||
private storage: Storage,) { }
|
||||
|
||||
async ngOnInit() {
|
||||
await this.storage.create();
|
||||
this.getDataGraph()
|
||||
// this.generateData();
|
||||
}
|
||||
async getDataGraph() {
|
||||
const id_identitas = await this.storage.get('id_identitas');
|
||||
this.pengukuranService.getGraphByIdentitas(id_identitas).subscribe(
|
||||
async (response: any[]) => {
|
||||
console.log(response);
|
||||
|
||||
// Filter the response to include only the segment with the name "Berat Badan"
|
||||
const filteredResponse = response.filter(series => series.series_name === "Berat Badan");
|
||||
|
||||
// Transform the filtered response into the desired format
|
||||
this.multi = filteredResponse.map(series => ({
|
||||
name: series.series_name,
|
||||
series: series.series_data.map((value: any, index: number) => ({
|
||||
name: (index + 1).toString(), // Use index + 1 as the name
|
||||
value: value
|
||||
}))
|
||||
}));
|
||||
},
|
||||
error => {
|
||||
console.error('Error fetching data:', error);
|
||||
}
|
||||
);
|
||||
}
|
||||
private getDateByIndex(index: number): string {
|
||||
// Define a method to generate date strings based on index
|
||||
// For demonstration, we use a fixed start date and increment it by one day for each index
|
||||
const startDate = new Date('2024-01-01');
|
||||
const date = new Date(startDate);
|
||||
date.setDate(startDate.getDate() + index);
|
||||
|
||||
return date.toISOString().split('T')[0]; // Format date as 'YYYY-MM-DD'
|
||||
}
|
||||
onSelect(data: any): void {
|
||||
console.log('Item clicked', JSON.parse(JSON.stringify(data)));
|
||||
}
|
||||
|
||||
onActivate(data: any): void {
|
||||
console.log('Activate', JSON.parse(JSON.stringify(data)));
|
||||
}
|
||||
|
||||
onDeactivate(data: any): void {
|
||||
console.log('Deactivate', JSON.parse(JSON.stringify(data)));
|
||||
}
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
<ngx-charts-pie-chart
|
||||
[view]="view"
|
||||
[scheme]="'neons'"
|
||||
[results]="single"
|
||||
[gradient]="gradient"
|
||||
[legend]="showLegend"
|
||||
[legendPosition]="legendPosition"
|
||||
[labels]="showLabels"
|
||||
[doughnut]="isDoughnut"
|
||||
(select)="onSelect($event)"
|
||||
(activate)="onActivate($event)"
|
||||
(deactivate)="onDeactivate($event)"
|
||||
>
|
||||
<!-- [scheme]="colorScheme" -->
|
||||
</ngx-charts-pie-chart>
|
|
@ -1,24 +0,0 @@
|
|||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { PieChartComponent } from './pie-chart.component';
|
||||
|
||||
describe('PieChartComponent', () => {
|
||||
let component: PieChartComponent;
|
||||
let fixture: ComponentFixture<PieChartComponent>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ PieChartComponent ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(PieChartComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
|
@ -1,60 +0,0 @@
|
|||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { LegendPosition, NgxChartsModule } from '@swimlane/ngx-charts';
|
||||
|
||||
@Component({
|
||||
selector: 'app-pie-chart',
|
||||
templateUrl: './pie-chart.component.html',
|
||||
styleUrls: ['./pie-chart.component.scss'],
|
||||
standalone: true,
|
||||
imports: [NgxChartsModule],
|
||||
})
|
||||
export class PieChartComponent implements OnInit {
|
||||
|
||||
// options
|
||||
gradient: boolean = true;
|
||||
showLegend: boolean = true;
|
||||
showLabels: boolean = true;
|
||||
isDoughnut: boolean = false;
|
||||
@Input() view: any;
|
||||
@Input() legendPosition = LegendPosition.Right;
|
||||
colorScheme: any = {
|
||||
domain: ['#5AA454', '#A10A28', '#C7B42C', '#AAAAAA']
|
||||
};
|
||||
single: any[] = [];
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
this.single = [
|
||||
{
|
||||
"name": "Germany",
|
||||
"value": 8940000
|
||||
},
|
||||
{
|
||||
"name": "USA",
|
||||
"value": 5000000
|
||||
},
|
||||
{
|
||||
"name": "France",
|
||||
"value": 7200000
|
||||
},
|
||||
{
|
||||
"name": "UK",
|
||||
"value": 6200000
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
onSelect(data: any): void {
|
||||
console.log('Item clicked', JSON.parse(JSON.stringify(data)));
|
||||
}
|
||||
|
||||
onActivate(data: any): void {
|
||||
console.log('Activate', JSON.parse(JSON.stringify(data)));
|
||||
}
|
||||
|
||||
onDeactivate(data: any): void {
|
||||
console.log('Deactivate', JSON.parse(JSON.stringify(data)));
|
||||
}
|
||||
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
<ngx-charts-bar-vertical
|
||||
[view]="view"
|
||||
[scheme]="'ocean'"
|
||||
[results]="single"
|
||||
[gradient]="gradient"
|
||||
[xAxis]="showXAxis"
|
||||
[yAxis]="showYAxis"
|
||||
[legend]="showLegend"
|
||||
[legendPosition]="legendPosition"
|
||||
[showXAxisLabel]="showXAxisLabel"
|
||||
[showYAxisLabel]="showYAxisLabel"
|
||||
[xAxisLabel]="xAxisLabel"
|
||||
[yAxisLabel]="yAxisLabel"
|
||||
(select)="onSelect($event)">
|
||||
<!-- [scheme]="colorScheme" -->
|
||||
</ngx-charts-bar-vertical>
|
|
@ -1,24 +0,0 @@
|
|||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { VerticalBarChartComponent } from './vertical-bar-chart.component';
|
||||
|
||||
describe('VerticalBarChartComponent', () => {
|
||||
let component: VerticalBarChartComponent;
|
||||
let fixture: ComponentFixture<VerticalBarChartComponent>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ VerticalBarChartComponent ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(VerticalBarChartComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
|
@ -1,52 +0,0 @@
|
|||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { NgxChartsModule, LegendPosition } from '@swimlane/ngx-charts';
|
||||
|
||||
@Component({
|
||||
selector: 'app-vertical-bar-chart',
|
||||
templateUrl: './vertical-bar-chart.component.html',
|
||||
styleUrls: ['./vertical-bar-chart.component.scss'],
|
||||
standalone: true,
|
||||
imports: [NgxChartsModule]
|
||||
})
|
||||
export class VerticalBarChartComponent implements OnInit {
|
||||
|
||||
// options
|
||||
showXAxis = true;
|
||||
showYAxis = true;
|
||||
gradient = false;
|
||||
showLegend = true;
|
||||
showXAxisLabel = true;
|
||||
xAxisLabel = 'Country';
|
||||
showYAxisLabel = true;
|
||||
yAxisLabel = 'Population';
|
||||
@Input() view: any;
|
||||
@Input() legendPosition = LegendPosition.Below;
|
||||
colorScheme: any = {
|
||||
domain: ['#5AA454', '#A10A28', '#C7B42C', '#AAAAAA']
|
||||
};
|
||||
single: any[] = [];
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
this.single = [
|
||||
{
|
||||
"name": "Germany",
|
||||
"value": 8940000
|
||||
},
|
||||
{
|
||||
"name": "USA",
|
||||
"value": 5000000
|
||||
},
|
||||
{
|
||||
"name": "France",
|
||||
"value": 7200000
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
onSelect(event: any) {
|
||||
console.log(event);
|
||||
}
|
||||
|
||||
}
|
|
@ -133,6 +133,12 @@
|
|||
</ng-template>
|
||||
</ngx-datatable-column>
|
||||
|
||||
<ngx-datatable-column prop="hba1c">
|
||||
<ng-template let-column="column" ngx-datatable-header-template let-sort="sortFn">
|
||||
<span class="tableHeader">HBA1C</span>
|
||||
</ng-template>
|
||||
</ngx-datatable-column>
|
||||
|
||||
<ngx-datatable-column prop="golongan_darah">
|
||||
<ng-template let-column="column" ngx-datatable-header-template let-sort="sortFn">
|
||||
<span class="tableHeader">Golongan Darah</span>
|
||||
|
|
Loading…
Reference in New Issue