Forum Stats

  • 3,874,263 Users
  • 2,266,716 Discussions
  • 7,911,794 Comments

Discussions

How to Stack a Bar Chart with Dynamic Source Query.

bostonmacosx
bostonmacosx Member Posts: 177 Blue Ribbon

We just updated from APEX 5 to 21...yikes and it broke most if not all of the charts.


I have a PLSQL block returning an SQL query dynamically.


SELECT NULL LINK,TO_CHAR(TRUNC(READING_DATE,'MM'),'MM-YYYY') DATIME,
SUM(decode(SUBSTR(OSVERSION,0,29),'Windows 10 Enterprise 2016 LT',COUNT))"Windows 10 Enterprise 2016 LT"
,SUM(decode(SUBSTR(OSVERSION,0,29),'Windows 7 Enterprise',COUNT))"Windows 7 Enterprise",
SUM(decode(SUBSTR(OSVERSION,0,29),'Windows 8.1 Enterprise',COUNT))"Windows 8.1 Enterprise",
SUM(decode(SUBSTR(OSVERSION,0,29),'Windows 10 Pro',COUNT))"Windows 10 Pro",
SUM(decode(SUBSTR(OSVERSION,0,29),'Windows 10 Pro for Workstatio',COUNT))"Windows 10 Pro for Workstatio",
SUM(decode(SUBSTR(OSVERSION,0,29),'Windows 10 Education',COUNT))"Windows 10 Education",
SUM(decode(SUBSTR(OSVERSION,0,29),'Windows Server 2016 Standard',COUNT))"Windows Server 2016 Standard",
SUM(decode(SUBSTR(OSVERSION,0,29),'Windows 10 Enterprise 2015 LT',COUNT))"Windows 10 Enterprise 2015 LT",
SUM(decode(SUBSTR(OSVERSION,0,29),'Windows 8.1 Pro',COUNT))"Windows 8.1 Pro",
SUM(decode(SUBSTR(OSVERSION,0,29),'Windows 10 Home',COUNT))"Windows 10 Home",
SUM(decode(SUBSTR(OSVERSION,0,29),'Windows 10 Enterprise LTSC 20',COUNT))"Windows 10 Enterprise LTSC 20",
SUM(decode(SUBSTR(OSVERSION,0,29),'Windows 7 Professional',COUNT))"Windows 7 Professional",
SUM(decode(SUBSTR(OSVERSION,0,29),'Windows Server 2012 R2 Standa',COUNT))"Windows Server 2012 R2 Standa",
SUM(decode(SUBSTR(OSVERSION,0,29),'Windows Vista (TM) Enterprise',COUNT))"Windows Vista (TM) Enterprise",
SUM(decode(SUBSTR(OSVERSION,0,29),'Windows 10 Enterprise',COUNT))"Windows 10 Enterprise"
 FROM APP_ALTIRIS_COMPOSCOUNT WHERE READING_DATE>SYSDATE-730  group by TRUNC(READING_DATE,'MM')
 ORDER BY TRUNC(READING_DATE,'MM') ASC

This above is what gets returned into the SOURCE of the chart.

I don't want to or shouldn't have to create series for each of the columns because they can change depending on the return......

I'm not sure how in 21.2 with JET to be able to achieve this.

Same thing...

Thanks

-R