2019-07-09 14:22:19 +01:00
import { Component , OnInit , AfterViewInit , Input , Output , EventEmitter , ViewChild , TemplateRef } from '@angular/core' ;
import { ApiService } from '../providers/api-service' ;
2019-07-10 12:49:36 +01:00
import { ChartOptions , ChartType , ChartDataSets } from 'chart.js' ;
import { Color } from 'ng2-charts' ;
import { BubbleChartComponent } from '../panels/bubble-panel' ;
2019-07-09 14:22:19 +01:00
import { AgmCoreModule } from '@agm/core' ;
import { BsModalService , ModalDirective } from 'ngx-bootstrap/modal' ;
import { BsModalRef } from 'ngx-bootstrap/modal/bs-modal-ref.service' ;
2019-07-10 12:22:26 +01:00
// interface RecurSupplierData {
// name : string;
// }
2019-07-09 14:22:19 +01:00
@Component ( {
templateUrl : 'more-graphs-and-tables.component.html' ,
} )
2019-07-10 12:22:26 +01:00
export class MoreStuffComponent implements OnInit { // if you wanna rename this, replace in all files 'MoreStuffComponent' with desired name and 'more-graphs-and-tables.component' with another desired name
// @Input() public recurList: Array<RecurSupplierData>;
2019-07-09 14:22:19 +01:00
@Output ( ) public onClick = new EventEmitter ( ) ;
@Input ( ) public categories : any ;
2019-07-10 12:49:36 +01:00
// chart data
public bubbleChartOptions : ChartOptions = {
responsive : true ,
scales : {
xAxes : [
{
ticks : {
min : 0 ,
max : 30 ,
}
}
] ,
yAxes : [
{
ticks : {
min : 0 ,
max : 30 ,
}
}
]
}
} ;
public bubbleChartType : ChartType = 'bubble' ;
public bubbleChartLegend = true ;
public bubbleChartData : ChartDataSets [ ] = [
{
data : [
{ x : 10 , y : 10 , r : 10 } ,
{ x : 15 , y : 5 , r : 15 } ,
{ x : 26 , y : 12 , r : 23 } ,
{ x : 7 , y : 8 , r : 8 } ,
] ,
label : 'Series A' ,
backgroundColor : 'green' ,
borderColor : 'blue' ,
hoverBackgroundColor : 'purple' ,
hoverBorderColor : 'red' ,
} ,
] ;
public bubbleChartColors : Color [ ] = [
{
backgroundColor : [
'red' ,
'green' ,
'blue' ,
'purple' ,
'yellow' ,
'brown' ,
'magenta' ,
'cyan' ,
'orange' ,
'pink'
]
}
] ;
2019-07-09 14:22:19 +01:00
public recurClick ( event : any ) : void {
this . onClick . emit ( event ) ;
}
constructor (
private api : ApiService ,
) { }
ngOnInit ( ) : void {
}
2019-07-10 12:49:36 +01:00
private setChartData ( dataCat : any ) {
}
2019-07-09 14:22:19 +01:00
}
2019-07-10 12:49:36 +01:00