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

How to use angular syntax in chart templates

1 Answer 69 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Mahindar
Top achievements
Rank 1
Mahindar asked on 02 Sep 2016, 11:46 AM

Hi,

when using angular syntax inside chart template it is getting displayed as string.  Sample

    $scope.text = "hi";
    $scope.valueAxisConfig = {
    labels: {
      template: '{{text}}#= kendo.toString(value, \'c0\') #'
    }
}

1 Answer, 1 is accepted

Sort by
0
Accepted
Rumen
Telerik team
answered on 06 Sep 2016, 07:18 AM
Hi,

At present not all Kendo UI templates support AngularJS expressions.

What you can do is to use a function returning a string for valueAxis.labels.template, i.e.

$scope.valueAxisConfig = {
  labels: {
    template: function(item)
    {
      return $scope.text + ' ' + kendo.toString(item.value, 'c0');
    }
  }
}


Best regards,
Rumen
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
Tags
Charts
Asked by
Mahindar
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or