crisbeto / angular-svg-round-progressbar

Angular module that uses SVG to create a circular progressbar
https://crisbeto.github.io/angular-svg-round-progressbar/
MIT License
741 stars 173 forks source link

How to change option values? #201

Open yavuzoktay opened 4 years ago

yavuzoktay commented 4 years ago

Hello, How can I change the options given in the component (max, radius, color, background) without using html in typescript, javascript?

crisbeto commented 4 years ago

Here's an example if you want to change the defaults for all progress circles: https://github.com/crisbeto/angular-svg-round-progressbar#configuring-the-default-values

Otherwise if you want to change it for a particular one, you can get a hold of the component using ViewChild:

class YourComponent {
  @ViewChild(RoundProgressComponent) progressCircle: RoundProgressComponent;

  ngAfterViewInit() {
    this.progressCircle.radius = 10;
  }
}