Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JET Treemap chart in Apex, demo?

Denisa BentoApr 16 2020 — edited Apr 17 2020

Hi,

I searched in forums, googled and reverse engineered few plugins but I am not able to figure out Treemap JET chart. I am Apex developer for many years but never created plugin before or used JET charts ( other then reuse others plug-ins, which I am really grateful for).  I tired to create new Treemap plugin https://apex.oracle.com/pls/apex/nisaruz/r/treemap  (test/test12345) but obviously the treemap.js going to have to be more complicated. I am just not sure how. I am feeding it SQL creating JSON ( below), which use the same node names and structure as in https://www.oracle.com/webfolder/technetwork/jet/jsdocs/oj.ojTreemap.html .

SELECT 15        AS "value"

     , 'Fruits'  AS "label"

     , 'yellow'      AS "color"

     , CURSOR ( SELECT rownum    AS "value"

                     , product_name  AS "label"

                     , CASE product_name

                        WHEN 'Apples'      THEN 'black'

                        WHEN 'Bananas'     THEN 'blue'

                        WHEN 'Cantaloupe'  THEN 'green'

                        WHEN 'Dates'       THEN 'red'

                        WHEN 'Grapes'      THEN 'yellow'

                        ELSE  'pink'

                    END AS "color"

      FROM eba_demo_chart_products

) AS "nodes"

  FROM dual;

I tried so many ways, deleted recreated 100x but no progress. Any help?

Is this Treemap chart too complicated and that is why no one created plugin for it?

This post has been answered by Oleh Tyshchenko on Apr 17 2020
Jump to Answer
Comments
Post Details
Added on Apr 16 2020
4 comments
1,417 views