I have a mekko chart that shows cost changes based on known future cost changes from 3rd party partners. I am plotting both cost increases and decreases in the same mekko, with the following rules:
CRM Teams go on x axis, sized on percentage of positive cost values only (ie cost increases)
each x axis category is divided vertically by customer, sized by absolute value of cost
cost increases are red, decreases are green (yes, the chart does look like Christmas)
in each x axis category, cost increases are at the bottom, decreases at the top
Data points look like this: {absCost: , cost: , crmTeam: , customer: , order: , sign: }, where:
absCost is |cost|
order is 0 if cost is negative, cost otherwise
sign is "positive" or "negative".
And this axis & series definition
// set x axis, group by crmTeam and order by "order"
var x = myChart.addAxis("x", "crmTeam", "order");
x.addOrderRule("order", true);
// set y axis, remove gridlines, hide it
var y = myChart.addPctAxis("y", "absCost");
y.showGridlines = false;
y.hidden = true;
// add series, aggregate by customer/sign combinations
// colour by sign
var s = myChart.addSeries(["customer", "sign"], dimple.plot.bar);
// make negative bars always be on the bottom
s.addOrderRule(function (left, right) {
if (left.sign === right.sign) return 0;
if (left.sign === "negative" && right.sign === "positive") return 1;
return -1;
});
// order by cost in descending order
s.addOrderRule("cost", true);
This was working fine until I updated to dimple 2.2, at which it starting giving every reactangle with order=0 a height of zero.
Changing things in the y-axis properties did nothing to change it, but removing "order" as a measure for the x axis started displaying them again, although not in the way I want it to (the x axis is no longer sized and ordered by sum of cost increases).
Any idea what's causing this? And if this was a necessary change in v2.2, do you have suggestions on how to change the chart? I'll have to keep using 2.1 otherwise, should be fine.
I have a mekko chart that shows cost changes based on known future cost changes from 3rd party partners. I am plotting both cost increases and decreases in the same mekko, with the following rules:
Data points look like this:
{absCost: , cost: , crmTeam: , customer: , order: , sign: }
, where:And this axis & series definition
This was working fine until I updated to dimple 2.2, at which it starting giving every reactangle with order=0 a height of zero.
Changing things in the y-axis properties did nothing to change it, but removing "order" as a measure for the x axis started displaying them again, although not in the way I want it to (the x axis is no longer sized and ordered by sum of cost increases).
Any idea what's causing this? And if this was a necessary change in v2.2, do you have suggestions on how to change the chart? I'll have to keep using 2.1 otherwise, should be fine.