export class BarChart {

    public barChartOptions: any = {
        scaleShowVerticalLines: false,
        responsive: true,
        scaleShowValues: true,
        tooltips: false,
        scales: {
            yAxes: [{
                ticks: {
                    max: 15,
                }
            }]
        },
        animation: {
            onComplete: function() {
                var chartInstance = this.chart,
                    ctx = chartInstance.ctx;
                ctx.textAlign = 'center';
                ctx.textBaseline = 'bottom';
                this.data.datasets.forEach(function(dataset, i) {
                    var meta = chartInstance.controller.getDatasetMeta(i);
                    meta.data.forEach(function(bar, index) {
                        var data = dataset.data[index];
                        ctx.fillText(data, bar._model.x, bar._model.y - 5);
                    });
                });
            }
        }
    };
  
    ////BAR CHART PROPERTIES???//////
  
    public barChartLabels: string[] = ['BASE', 'BRONZE', 'SILVER', 'GOLD']; //X Asix Label
    public barChartType: string = 'bar'; //Chart Type
    public barChartLegend: boolean = false; //Show Legend 
    
    
    public chartClicked(e: any): void {
        console.log(e);
    }
  
    public chartHovered(e: any): void {
        console.log(e);
    } 
    
    constructor (public data:any){
    console.log(data)
      }
  }