Automatic percentage calculation

6 posts, 0 answers
  1. Simon
    Simon avatar
    166 posts
    Member since:
    Sep 2010

    Posted 05 Jan 2015 Link to this post

    From my understanding, Kendo chart can handle 2 kind of values:

    -Absolute where the value represent the number of item matching a given category / subcategory. (Ex. Basic Area)
    -Percent where the value is a percent (express in a 0.0 to 1.0 form) of item in a given category compare to siblings categories. (Ex: 100% Stacked area)

    I've been dealing with Kendo chart for a couple of weeks and I just find out that the Pie Chart does some kind of internal conversion from absolute values to a percent values.  Indeed, if you give following value to a Pie Chart: category A = 2000, category B = 1000, category C = 1000, the Pie chart will calculate the right ratio for each categories and the chart will render with the expected 50% / 25% / 25% percentages.

    My question is the following: If the charts has an internal way to calculate the percentage, is there a way to generate percent charts (like the 100% stacked area) by providing only the absolute values?

    Best regards,

    Simon





  2. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2622 posts

    Posted 07 Jan 2015 Link to this post

    Hi Simon,

    I am not quite sure if I understand your scenario correctly - by design the 100% stacked chart generates percentage values from absolute. Could you please elaborate a bit more on the exact outcome you would like to achieve - this way I would be able to advice you further and provide concrete recommendations? 

    Regards,
    Iliana Nikolova
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Simon
    Simon avatar
    166 posts
    Member since:
    Sep 2010

    Posted 07 Jan 2015 in reply to Iliana Nikolova Link to this post

    Hello Iliana Nikolova,

    I just find out what the problem is.  Indeed, chart will generate the percentage values from the absolute data provided.  As I forgot to change the way the min / max value are generated, I ended with a percent chart using a min / max value based on the absolute values.  Final result was an area with a value of 1 but displayed with on a scale of 250 000+

    Transforming the data into a percentage solved my problem but obviously, it wasn't the right way to do it...  sorry about my early conclusions.

    By the way, is there a way to set to min / max value of the chart to automatic (i.e. calculated by the chart itself based on the provided absolute values)?

    Best regards,

    Simon

  4. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2622 posts

    Posted 09 Jan 2015 Link to this post

    Hi Simon,

    I am glad to hear the initial issue has been resolved. As for your other question, this is the default behavior of Kendo UI Chart - please take a look at this example and let me know if I am missing something?

    Regards,
    Iliana Nikolova
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  5. Simon
    Simon avatar
    166 posts
    Member since:
    Sep 2010

    Posted 09 Jan 2015 in reply to Iliana Nikolova Link to this post

    Hello Iliana,

    The example you provided is empty.
  6. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2622 posts

    Posted 13 Jan 2015 Link to this post

    Hi Simon,

    Here is a basic example which demonstrates the discussed functionality - please check it and let me know if this helps.

    Regards,
    Iliana Nikolova
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top