R2 2018 Release is here – now with modern UI for chatbots and more! See what’s new!
Change Theme

SASS Themes

    LESS Themes

      SASS Theme Builder

      Create new or customize SASS themes
      Launch Theme Builder

      Donut Charts / Donut labels

      Labels Configuration


      This example shows how to show/hide the labels of the ASP.NET Core Donut Chart and specify how they are aligned.

      You can do that by getting a reference to the Chart client-object via:

      var chart = $("#chart").data("kendoChart")

      which will allow you to set and configure its series collection and attributes:

      var pieSeries = chart.options.series[0];
      pieSeries.labels.visible = true|false; // If set to true the chart will display the series labels.
      pieSeries.labels.align = "circle"; // "circle" - the labels are positioned in circle around the chart."column" - the labels are positioned in columns to the left and right of the chart.

      You can find a complete list of the series attributes in the control’s API documentation.

      ASP.NET Core source

      Also available for:

      • donut_labels.cshtml
      • Donut_LabelsController.cs

      Support & learning resources

      Donut Charts for other technologies