ng2-charts#Label TypeScript Examples

The following examples show how to use ng2-charts#Label. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: app.component.ts    From covid19-people-counter-system with MIT License 6 votes vote down vote up
refreshData(){
    const newData:{title: string, barChartLabels: Label[], barChartData: ChartDataSets[]}[] = [];
    this.spinner.show();
    this.apiService.getAllData().pipe(take(1)).subscribe(graphs=>{
      graphs.forEach(singleGraphData=>{
        const barChartData: ChartDataSets[] =[];
        const barChartLabels: Label[] = [];
        barChartData[0]  = {data:[], label: singleGraphData[0][2]}
        singleGraphData.forEach(singleData=>{
          barChartData[0]['data'].push(singleData[0]);
          barChartLabels.push(formatDate(singleData[1],environment.dateFormat,environment.locale,environment.timezone));
        })
        barChartData[0]['data'] = barChartData[0]['data'].reverse();
        
        newData.push({title:singleGraphData[0][3] ,barChartData: barChartData, barChartLabels: barChartLabels.reverse()})
      })

      this.data = newData;
      this.spinner.hide();
    });
    
  }
Example #2
Source File: leverage-chart-dialog.component.ts    From 1x.ag with MIT License 5 votes vote down vote up
public lineChartLabels: Label[] = [];
Example #3
Source File: space-usage-chart.component.ts    From RcloneNg with MIT License 5 votes vote down vote up
public doughnutChartLabels: Label[] = ['Totol', 'Used', 'Other', 'Trashed', 'Free'];
Example #4
Source File: pool-members-table.component.ts    From thorchain-explorer-singlechain with MIT License 5 votes vote down vote up
public pieChartLabels: Label[] = [];
Example #5
Source File: volume.component.ts    From thorchain-explorer-singlechain with MIT License 5 votes vote down vote up
public lineChartLabels: Label[] = [];
Example #6
Source File: cases-stat.component.ts    From angular-9-coronavirus-cases-app with MIT License 5 votes vote down vote up
barChartLabels: Label[] = [];
Example #7
Source File: sales.component.ts    From mean-stack-angular-9-realtime-crud with MIT License 5 votes vote down vote up
public pieChartLabels: Label[] = [];
Example #8
Source File: app.component.ts    From covid19-people-counter-system with MIT License 5 votes vote down vote up
data:{title: string, barChartLabels: Label[], barChartData: ChartDataSets[]}[] = [];
Example #9
Source File: app.component.ts    From covid19-people-counter-system with MIT License 5 votes vote down vote up
public barChartLabels: Label[] = ['2006', '2007', '2008', '2009', '2010', '2011', '2012'];
Example #10
Source File: fan-graph.component.ts    From tuxedo-control-center with GNU General Public License v3.0 5 votes vote down vote up
// Graph data
    public tempsLabels: Label[] = Array.from(Array(100).keys()).concat(100).map(e => this.formatTemp(e));