This is a migrated thread and some comments may be shown as answers.

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

1 Answer 93 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Joe Sugden
Top achievements
Rank 1
Joe Sugden asked on 07 Sep 2012, 03:59 PM
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!

1 Answer, 1 is accepted

Sort by
0
Accepted
T. Tsonev
Telerik team
answered on 11 Sep 2012, 08:38 AM
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!
Tags
Charts
Asked by
Joe Sugden
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Share this question
or