Stack and DataSource

2 posts, 0 answers
  1. Andrey
    Andrey avatar
    16 posts
    Member since:
    Oct 2019

    Posted 18 Feb Link to this post

    Hi, Dev Team!

    For my bar chart i create DataSource dinamycally/

    its looks like below:

    var docChartData = []; (item) {
       docChartData.push({ Name: "some name", Value: "some value", Color: "red"})

    So, I want to stack my chart. how can i add additional stack serie. i try like this, but it didnt work (item) {

       docChartData.push([{ Name: "some name", Value: "some value", Color: "red"},Name: "some name", Value: 100% - "some value", Color: "GRAY"}])

  2. Nikolay
    Nikolay  avatar
    36 posts

    Posted 20 Feb Link to this post

    Hello Andrey,

    You can manipulate the arrays and then call the refresh() method of the Kendo UI Chart to visualize the new options:

    var newStack = {
              name: "Platinum Medals",
              data: [80, 32, 34, 18, 45, 33, 34, 83, 43, 37, 44, 37, 54, 36, 46],
              color: "pink"
            var chart = $("#chart").data("kendoChart");

    Please refer to the following Dojo demo I have prepared demonstrating the above:

    Let me know if further questions arise.

    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top