ShinobiCharts Columns Stacking in version 2.8.1


#1

Hello,

In version 2.6.1, when stacking two columns with the same stacking index series I’ve managed to get the effect of columns to be one “behind” another. Emulating overall amount with one color (grey), and some part of overall amount with green color. Like on this screenshot:

After updating to charts version 2.8.1 with the same codebase, I’m getting two series simply one above the other. It is not starting to draw both series from 0, it is drawing the grey serie and then it is drawing green one from where the grey one ended, like here:

Is something changed in stacking behavior in version 2.8.1? How can I get the same behavior like in 2.6.1 version?

Thanks,

Philip


#2

Hi Philip,

As far as I know we haven’t changed anything about the stacking behaviour since 2.6.1.

Would you mind posting your data and chart datasource methods?

Kind regards,

Sam


#3

Hello, sorry for the late response. My bad, it was not related to stacking. 

Here I’ve made two examples to illustrate how data is shown in version 2.6.2 and 2.8.1.

https://dl.dropboxusercontent.com/u/78601/shinobi_columns_behavior.zip


#4

Hi Phillip,

After looking at your projects I noticed the 2.8.1 project didn’t set the stackIndex on either of the series so they aren’t stacked.

Could you check the 2.8.1 project is correctly set up?

Regarding the columns not starting from a value of zero, this can be set to any custom value using the “baseline” property on your column series.

If you set this to “0” it should produce the behaviour you require.

Let me know if you have any questions.

Kind regards,
Andrew Polkinghorn


#5

Hi Andrew,

I’ve set properties as you recommended, but I’m still not getting needed behaviour.

https://dl.dropboxusercontent.com/u/78601/version_2_8_1.zip

Regards,

Philip 


#6

Any update?


#7

Hi Philip,

After further investigation it looks like the way you implemented your stacked colimns to work in 2.6.1 was implemented incorrectly but visually provided what you wanted.

This issue has been fixed in our latest version therefore it is preventing the visual column chart you want.

When stacking bars or columns they are programmed to stack the entire bar/column value on top of the one it’s stacked on.

For example, if the X-value Broccoli had a Y-value of 4 in the first series and 5 in the second series. The second series will start at the stacked value of 4 and add 5 to it.

Meaning the column for datapoint with X-Value Broccoli in second stacked series will start at 4 and end on 9.

If you wish the second series to end on a specific Y-Value you must take all the previous Y-values from the datapoints in the series that it is stacked on top of into account.

For example, if you wish the second series for the Broccoli X-Value to end on 7 rather than 9, you must pass 3 as the datapoint Y-value rather than 5.

Let me know if you have any questions.

Kind regards,
Andrew Polkinghorn


#8

Thanks for the info.

Philip