Negative values displaying as positive when using stacked and grouped bar chart!

2 posts, 1 answers
  1. Joe Sugden
    Joe Sugden avatar
    53 posts
    Member since:
    Feb 2010

    Posted 07 Sep 2012 Link to this post

    Hello,

    Consider the following code we tried out in the Dojo:

    // Add chart configuration code
    $("#donut").kendoChart({
        theme: $(document).data("kendoSkin") || "default",
        title: {
            text: "World population by age group and sex"
        },
        legend: {
            visible: false
        },
        seriesDefaults: {
            type: "column"
        },
        series: [{
            name: "0-19",
            stack: "Female",
            data: [1100941, 1139797]
        }, {
            name: "20-39",
            stack: "Female",
            data: [810169, 883051]
        }, {
            name: "0-19",
            stack: "Male",
            data: [-1155600, -1202766]
        }, {
            name: "20-39",
            stack: "Male",
            data: [-844496, -916479]
        }],
        seriesColors: ["#cd1533", "#d43851", "#dc5c71", "#e47f8f"],
        valueAxis: {
            labels: {
                template: "#= kendo.format('{0:N0}', value / 1000) # M"
            }
        },
        categoryAxis: {
            categories: [1990, 1995]
        },
        tooltip: {
            visible: true,
            template: "#= series.stack #s, age #= series.name #"
        }
    });

    It's just a short version of the demo code for stacked and grouped bars, but once you get into negative values, some of them stack up as positive instead of negative...

    See screenshot too.

    Thanks!
  2. Answer
    T. Tsonev
    Admin
    T. Tsonev avatar
    2815 posts

    Posted 11 Sep 2012 Link to this post

    Hello,

    Thank you for reporting this problem. We'll investigate it and try to provide a fix in time for the upcoming Service Pack.

    As a token of gratitude for your involvement your Telerik points have been updated.

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