4

I use ng2-charts doughnut chart, I want write 15$ to insede but can't. Please help me. Thank you very much.

html

<div align="center">
  <label style="font-size: 19px;">Chart</label>
  <canvas baseChart 
          [data]="doughnutChartData" 
          [labels]="doughnutChartLabels" 
          [chartType]="doughnutChartType">
  </canvas>
</div>

Component

import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-chartbalance',
  templateUrl: './chartbalance.component.html',
  styleUrls: ['./chartbalance.component.css']
})
export class ChartbalanceComponent implements OnInit {

  constructor() { }

  ngOnInit() {
  }

  private doughnutChartType: string = "doughnut";
  private doughnutChartData: number[] = [40, 40, 20];
  private doughnutChartLabels: string[] = ["ETH", "LTC", "XRP"];
}

enter image description here

nguyenhuyenag
  • 313
  • 5
  • 13

0 Answers0