3 Replies Latest reply: Oct 17, 2013 10:13 PM by Roadling RSS

    Question about Stacked Chart ... is this possible?

    clichten

      This seems possible but I cannot get APEX to do it, wondering if someone has any ideas:

       

      Say I have a table with multiple records with columns which contain a DATE, PERSON, TEAM ...

      I am comparing number of records per team but trying to show in the STACK how each person contributed ...

      Lets say there are 5 teams ...

      I want to end up with a STACKED BAR chart which shows HOW MANY INSTANCES (count(*)) per TEAM ...

      I want to end up with 5 BARs and each subdivided with the number of record instances which each PERSON in that team.

       

      So at the end of the day, we can see how different people contributed to the overall total of a team and we can see how each team fared against one another ...

       

       

      Thank you!
      C

        • 1. Re: Question about Stacked Chart ... is this possible?
          Vishal Pathak (OBIEE-APEX)

          yes possible

           

          check this: https://forums.oracle.com/thread/2393942

           

          Kindly let me know if this answers your query in this thread

           

          Regards,

          Vishal

          • 2. Re: Question about Stacked Chart ... is this possible?
            clichten

            Thank you for contacting me ...

             

            I tried something similar but I end up with SEPARATE BARs not with the PEOPLE from the same TEAM staked one on top of the other in the same BAR chart ...

            I tried:

            Series1:

            select null link, person label, count(*) value from tablex group by person where team='TEAM1'

            Series2:

            select null link, person label, count(*) value from tablex group by person where team='TEAM2'

            ...

            and so on ...

             

            Most examples have dates as separators but mine would be a fixed number of TEAMS and a variable and unknown number of PERSONs and the NUMBER of RECORDS (count(*)) is what I want to compare ...

            THANK YOU !!!

            • 3. Re: Question about Stacked Chart ... is this possible?
              Roadling

              You would build a series per team and group on your date value with same aggregate.

               

              Sample series using EMP and DEPT tables.  seen here  Chart Axis

               

              Series 1
              select null link, TRUNC(e.HIREDATE,q') label, count(*) acct
              from  "EMP" e natural join "DEPT" d
              where d.dname = 'ACCOUNTING'
              group by TRUNC(e.HIREDATE,q')
              
              Series 2
              select null link,TRUNC(e.HIREDATE,q') label, count(*) sales
              from  "EMP" e natural join "DEPT" d
              where d.dname = 'SALES'
              group by TRUNC(e.HIREDATE,q')
              
              Series 3
              select null link, TRUNC(e.HIREDATE,'q') label, count(*) research
              from  "EMP" e natural join "DEPT" d
              where d.dname = 'RESEARCH'
              group by TRUNC(e.HIREDATE,q')
              
              
              

               

              Regards,

              Brad