Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8958775
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T15:17:33+00:00 2026-06-15T15:17:33+00:00

I cannot get this simple KendoUI Pie chart to work and I do not

  • 0

I cannot get this simple KendoUI Pie chart to work and I do not see anything wrong with the code.

I only have some basic JSON which I am trying to bind to. As you can see the source data contains already calculated percentages and also the actual values. I am only trying to bind the pie chart to the percentage columns. The reason for the percentageUnit and percentageValue is because I already have code in place to switch between the two. The actual value and unit fields will be used as tooltips. So it is important to have all that data in the source.

The chart does populate but looks totally messed up. Is it me or Kendo?

http://jsfiddle.net/jqIndy/38gH4/

Pie Chart Result

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8" />
  <title>JS Bin</title>
  <script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
  <script src="http://cdn.kendostatic.com/2012.3.1114/js/kendo.all.min.js"></script>
  <link href="http://cdn.kendostatic.com/2012.3.1114/styles/kendo.common.min.css" rel="stylesheet" />
  <link href="http://cdn.kendostatic.com/2012.3.1114/styles/kendo.default.min.css" rel="stylesheet" />
  <link href="http://cdn.kendostatic.com/2012.3.1114/styles/kendo.dataviz.min.css" rel="stylesheet" />
  <link href="http://cdn.kendostatic.com/2012.3.1114/styles/kendo.dataviz.default.min.css" rel="stylesheet" />
</head>
<body>
  <div id="client-order-status"></div>

  <script>
    var dr = [{
        Status: "CANCELLED",
        Units:554615.000000000000,
        Value:12194910.410000000000,
        PercentageUnits:12.955700000000,
        PercentageValue:25.479241000000
      },{
        Status: "INVOICED",
        Units:3260369.000000000000,
        Value:31610141.095120000000,
        PercentageUnits:76.161596000000,
        PercentageValue:66.044143000000
      },{
        Status: "OPEN",
        Units: 465873.000000000000,
        Value: 4057089.598000000000,
        PercentageUnits: 10.882704000000,
        PercentageValue: 8.476615000000
      }];

      var dsCOStatus = new kendo.data.DataSource({
        data: dr,
        schema: {
          type: "json",
          model: {
            fields: {
              Status: "Status",
              PercentageUnits: "PercentageUnits",
              PercentageValue: "PercentageValue",
              Units: "Units",
              Value: "Value"
            }
          }
        },
      });

      $(function () {

        $("#client-order-status").kendoChart({
          dataSource: dsCOStatus,
          title: {
            text: "Client Order Status (past 12 months)"
          },
          legend: {
            position: "bottom"
            //labels: {
            //  template: "#= text # (#= value #%)"
            //}
          },
          seriesDefaults: {
            type: "pie"
            //labels: {
            //  visible: true,
            //  format: "{0}%"
            //}
          },
          series: [{
            field: "Status",
            categoryField: "Value"
          }],
          tooltip: {
            visible: true
            //format: "{0}"
          }
        }).show();
      });

  </script>
</body>
</html>

In XML I have the same problem:

var drXML = "<D><Report><Status>CANCELLED</Status><Units>554615.000000000000</Units><Value>12194910.410000000000</Value><PercentageUnits>12.955700000000</PercentageUnits><PercentageValue>25.479241000000</PercentageValue></Report><Report><Status>INVOICED</Status><Units>3260369.000000000000</Units><Value>31610141.095120000000</Value><PercentageUnits>76.161596000000</PercentageUnits><PercentageValue>66.044143000000</PercentageValue></Report><Report><Status>OPEN</Status><Units>465873.000000000000</Units><Value>4057089.598000000000</Value><PercentageUnits>10.882704000000</PercentageUnits><PercentageValue>8.476615000000</PercentageValue></Report></D>";

    var dsCOStatus = new kendo.data.DataSource({
      data: drXML,
      schema: {
        type: "xml",
        data: "/D/Report",
        model: {
          fields: {
            Status: "Status/text()",
            PercentageUnits: "PercentageUnits/text()",
            PercentageValue: "PercentageValue/text()",
            Units: "Units/text()",
            Value: "Value/text()"
          }
        }
      }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T15:17:34+00:00Added an answer on June 15, 2026 at 3:17 pm

    I think that you need to swap your categoryField and field names:

    series: [{
        field: "Value",
        categoryField: "Status"
    }]
    

    From the API reference:

    • categoryField: The data field containing the sector category name.
    • valueField: The data field containing the series value.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This problem seems very simple, however I cannot get this to work. I have
I can not get to make this comparison in this simple code error ..
Hey guys I simply cannot get this to work. I have some content that
I cannot get this to work, here is code that I found in another
This is so simple but I cannot get it to work. I want to
I cannot get this simple piece of code to compile without including the TestClass.cpp
I cannot get this to work. I only want to get the string between
I hopefully have a simple question I just cannot get anything I try to
This seems simple but I just cannot get it. I have an asp.net page,
This would seem to be super simple but I cannot get it to work

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.