This is a migrated thread and some comments may be shown as answers.

radialgauge custom labels

1 Answer 121 Views
Gauges
This is a migrated thread and some comments may be shown as answers.
Yoel
Top achievements
Rank 1
Yoel asked on 17 Mar 2021, 01:49 PM

this is my custom implementation of the labels:

 

               <kendo-radialgauge-scale-labels

                 //what is the syntax to call my function ???
                content="getGaugeLabels(val)"  

                position="outside">
                </kendo-radialgauge-scale-labels>

 

how can I set custom labels ??

in the api documentation => 

content?
(e: any) => string
The function which returns the label content.
The available fields in the function argument are:
value—The value of the label.

 

how can I use that in angular 9 ????

1 Answer, 1 is accepted

Sort by
0
Svet
Telerik team
answered on 19 Mar 2021, 08:43 AM

Hi Yoel,

The proper syntax is the following:

`      <kendo-radialgauge [pointer]="{ value: value }" [scale]="{ max: 50 }">
        <kendo-radialgauge-scale-labels
          [content]="getGaugeLabels"
          position="outside"
        >
        </kendo-radialgauge-scale-labels>
      </kendo-radialgauge>
    </div>
  `
})
export class AppComponent {
  public value = 10;
  getGaugeLabels(args) {
    console.log(args);
    return args.value;
  }
}

Here is an example:

https://stackblitz.com/edit/angular-g6nsdd?file=app/app.component.ts

I hope this helps. Please let me know in case any further information is required for this case.

Regards,
Svetlin
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Gauges
Asked by
Yoel
Top achievements
Rank 1
Answers by
Svet
Telerik team
Share this question
or