How to use angular syntax in chart templates

2 posts, 1 answers
  1. Mahindar
    Mahindar avatar
    1 posts
    Member since:
    Sep 2016

    Posted 02 Sep Link to this post

    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\') #'
        }
    }

  2. Answer
    Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 06 Sep Link to this post

    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.
     
  3. Kendo UI is VS 2017 Ready
Back to Top