Stacked MultiBar Chart

Hi,

I am testing creating a stacked MultiBar Chart, but not succeeding in getting the chart to stack.

  • it just stays as a normal multiBar.

I suspect I am either usinig the ‘tm1-ui-chart-value’ directive incorrectly, or maybe there is a problem in the way the tm1-value object variable, CeFlashN1TotalPe, is declared.

Current Code:
Html:

Js:

Any help/guidance would be appreciated!

Thanks in advance.

Regards,
Gerhard

Hi @gpool,

A multi bar chart should have at least two series (sets of data) to stack up to each other. Looking at your screenshot, I could only see series ‘a’.

What was the intention of the chart?


Paul

Hi Paul,

Aah ok I follow - so i just need to add another tm1-ui-chart-value formula?

I need to replicate something that looks like (or is as close as possible…) to this:

Just focusing on the stacking for now - will tackle the value labels a bit later.

Regards,
Gerhard

Hi @gpool,

Not just another tm1-ui-chart-value formula, but another set/series of data.

For example, if you have values in the multi bar chart as series A:

100, 200, 500

Then, you should have another series that is let us say, series B, that has:

200, 300, 100

The multi bar, will “pair” 100 and 200 from series A and B, and will do so for the rest. These are what the multi bar chart is stacking up (100 over 200, 200 over 300, 500 over 100).

Let us know how it goes.


Paul

Hi @plim ,

Thanks for explaining - i managed to get it working now.
I created a new simplified tm1-value-object and adjusted the tm1-ui-chart-value directives itself also:

tm1-value-object:
$scope.oubObjUnit =
{“key”:“Freight”
,“values”:[{‘value’:‘10’},{‘value’:‘5’}]
};
$scope.peObjUnit =
{“key”:“Phys Exec”
,“values”:[{‘value’:‘8’},{‘value’:‘4’}]
};

tm1-ui-chart-values:

Regards,
Gerhard

1 Like