|RE: [birt-news] problems with stacked bar chart|
Attached is the example design I made, as you have seen from screenshot, Chart supports Category (X) series grouping and Optional Y series grouping, you could simply enable X series grouping and set Y series groping to row[“PeriodOfTime”], you will get correct result.
You can use visual designer or directly invoke Chart API to set grouping condition in standalone mode. No need to use scripting.
Alec Lebedev [mailto:alec.lebedev@xxxxxxxxxxxx]
Yes, thanks! This is exactly what I needed.
What is the right way to define drill-through behavior for each stack on this chart? Can this be done just by using the visual designer or I have to use scripting?
Heng Li [mailto:heng.li@xxxxxxxxxxx]
Do you want the chart looks like this?
You can set period of time as Y series grouping and enable X series grouping.
birt-news-bounces@xxxxxxxxxxx [mailto:birt-news-bounces@xxxxxxxxxxx] On Behalf Of Alec Lebedev
I have the following data set, which lists the date, the period of time, and the number of users that were inactive within that period of time on that date.
01/01/2007 0 15
01/01/2007 7 10
01/01/2007 30 0
15/06/2007 0 21
15/06/2007 7 4
15/06/2007 30 5
I would like to build a stacked bar chart, which has one bar per distinct date (first column) and one stack per distinct period of time (second column). Each stack’s height will be set to the number of users (third column).
So, for the data set above I would have two bars: one – for 01/01/2007 and another one for 15/06/2007. The first bar will have three stacks on heights 15, 7 and 30. The second bar will also have three stacks with heights 21, 4 and 5.
I can map X-series to the first column, but I don’t know how to map each Y series to the corresponding period of time. In other words, I want one Y-series to be mapped to rows with interval=0, another series – to rows with interval = 7 and the last series – to rows with interval=30.
How should I define expressions for those series in _expression_ Builder?