Data Not Displaying Correctly on StackedBarH

Hi

I am trying to implement a StackedBarH chart. There are 5 possible options can be displayed in each series with the count displayed as a label in each 1, however if a series only displays 1 or 2 options then I am getting lots of unnecessary zeros displayed in the chart. My data is like:

var dataset =
{ department: “Dept1”, Win10Count: 0, Win7Count: 1, WinXPCount: 3, WinNTCount: 0, MacCount: 0},
{ department: “Dept2”, Win10Count: 0, Win7Count: 10, WinXPCount: 0, WinNTCount: 0, MacCount: 0},
{ department: “Dept3”, Win10Count: 0, Win7Count: 6, WinXPCount: 2, WinNTCount: 0, MacCount: 0},
{ department: “Dept4”, Win10Count: 5, Win7Count: 3, WinXPCount: 0, WinNTCount: 0, MacCount: 0},
{ department: “Dept5”, Win10Count: 1, Win7Count: 1, WinXPCount: 1, WinNTCount: 1, MacCount: 1},
];

So for Dept1, I only want to see the Win7Count and WinXP Count values on the chart label, but I am also seeing the ‘0’ values for Win10, WinNT and Mac Counts displayed on the bars for Win7 and Win XP and also on the white space outside of the actual bar.

For Dept5, because there are no 0 values, it displays fine.

Please note this works fine for the StackedBar chart. Its just the horizontal chart has the problem.

Also I can probably explain this better with a screenshot, if you can let me know if there is anywhere I can upload an image to.

Thanks
Eve

Hello,

I can confirm the bug. It will be fixed in the upcoming 4.2.

Thank you for reporting.

I got around the problem in the meantime by adding the following function to the series…

label: function(obj)
                       {
                           if (obj.MacCount > 0) {
                               return obj.MacCount;
                           }
                           else
                           {
                               return false;
                           }
                       }