Thursday, 12 September 2013

Highcharts: Stacking a column inside of another column

Highcharts: Stacking a column inside of another column

I don't know if highchart has support for this, I can't seem to find
anything in my searched. But I would like to stack a column inside a
column.
I have 2 series of data: Daily Active Users (DAU), and New Users (NU). New
Users is a part of Daily Active Users therefore I would like to stack New
Users inside of Daily Active Users, not on top of it.
Example: For one entry New Users is 3, and Daily Active Users 10. On the Y
axis, I would like to have Daily Active Users reach to value 10, but I
would want to start plotting New Users at value 7.
Here is what I have so far. This is incorrect because New Users is just
plotted on top of Daily Active Users.
http://jsfiddle.net/6JACr/
If you look at the first entry of August 6th, 2013: Daily Active Users is
6,310 and New Users is 1,325. New Users is being plotted starting at 6,310
when I want it to be starting at 4,985 (6,310-1,325).
Here is the code where I stack the columns
nu_series = {
name: "NU",
type: "column",
data: nu_data,
stack: 0
};
all_series[1] = nu_series;
dau_series = {
name: "DAU",
type: "column",
data: dau_data,
stack: 0
};
all_series[2] = dau_series;

No comments:

Post a Comment