Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Treemap Sort

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Treemap Sort
 Login/Join
 
Platinum Member
posted
I want to be able to sort the output and not use the size bucket to dictate which group displays first. In the example below I want to ALWAYS display the 'Specialty" brand first then standard. I have tried slider, Page, Column, detail, tooltip. Page comes to the almost what is required since I need to place the charts horizontal in a responsive panel on a page. The page makes them vertical.

[ code ]
ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
SET HTMLENCODE=ON
SET ARGRAPHENGINE=JSCHART
SET EMBEDHEADING=ON
SET GRAPHDEFAULT=OFF
-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='405.0';
-DEFAULTH &WF_STYLE_WIDTH='770.0';
-DEFAULTH &WF_TITLE='WebFOCUS Report';
GRAPH FILE wf_retail_lite
-* Created by Info Assist for Graph
SUM WF_RETAIL_LITE.WF_RETAIL_SALES.SALE_UNITY
WF_RETAIL_LITE.WF_RETAIL_SALES.REVENUE_US
FST.WF_RETAIL_LITE.WF_RETAIL_PRODUCT.PRODUCT_DESCRIPTION AS 'Product,Description'
BY WF_RETAIL_LITE.WF_RETAIL_PRODUCT.BRANDTYPE
BY WF_RETAIL_LITE.WF_RETAIL_PRODUCT.PRODUCT_NAME
WHERE WF_RETAIL_LITE.WF_RETAIL_PRODUCT.PRODUCT_SUBCATEG EQ &PRODUCT_SUBCATEG.(OR(FIND WF_RETAIL_LITE.WF_RETAIL_PRODUCT.PRODUCT_SUBCATEG IN WF_RETAIL_LITE |FORMAT=A50V)).Product Subcategory:.;
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET GRWIDTH 1
ON GRAPH SET UNITS &WF_STYLE_UNITS
ON GRAPH SET HAXIS &WF_STYLE_WIDTH
ON GRAPH SET VAXIS &WF_STYLE_HEIGHT
ON GRAPH SET LOOKGRAPH TREEMAP
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
setDataTextDisplay(true);
*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, PAGESIZE=LEGAL, $
TYPE=DATA, COLUMN=N1, BUCKET=detail, $
TYPE=DATA, COLUMN=N2, BUCKET=detail, $
TYPE=DATA, COLUMN=N3, BUCKET=color, $
TYPE=DATA, COLUMN=N4, BUCKET=size, $
TYPE=DATA, COLUMN=N5, BUCKET=tooltip, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
*GRAPH_JS_FINAL
"pieProperties": {
"holeSize": "0%"
},
"agnosticSettings": {
"chartTypeFullName": "Treemap"
}
*END
ENDSTYLE
END
-RUN

[ /code ]

This message has been edited. Last edited by: David Sibert,


dksib
DC Tech Services Inc
WF 8.2.1M
 
Posts: 117 | Location: US | Registered: February 09, 2004Report This Post
Virtuoso
posted Hide Post
Why not ding another dummy BY field ?

Something such as
DEFINE FILE wf_retail_lite
DUMMY_BY /I2 = IF BRANDTYPE EQ 'Specialty' THEN 1 ELSE 2;
END
GRAPH FILE wf_retail_lite
SUM WF_RETAIL_LITE.WF_RETAIL_SALES.SALE_UNITY
    WF_RETAIL_LITE.WF_RETAIL_SALES.REVENUE_US
    FST.WF_RETAIL_LITE.WF_RETAIL_PRODUCT.PRODUCT_DESCRIPTION AS 'Product,Description'
BY DUMMY_BY NOPRINT
BY WF_RETAIL_LITE.WF_RETAIL_PRODUCT.BRANDTYPE
BY WF_RETAIL_LITE.WF_RETAIL_PRODUCT.PRODUCT_NAME
...
TYPE=DATA, COLUMN=N1, BUCKET=detail, $
TYPE=DATA, COLUMN=N2, BUCKET=detail, $
TYPE=DATA, COLUMN=N3, BUCKET=detail, $
TYPE=DATA, COLUMN=N4, BUCKET=color, $
TYPE=DATA, COLUMN=N5, BUCKET=size, $
TYPE=DATA, COLUMN=N6, BUCKET=tooltip, $
...


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Platinum Member
posted Hide Post
I wish that it was that simple. If I do this either as detail or tooltip that field and value will show on the TOOLTIP/Hover and the business does not want to see that. That was my first try.


dksib
DC Tech Services Inc
WF 8.2.1M
 
Posts: 117 | Location: US | Registered: February 09, 2004Report This Post
Virtuoso
posted Hide Post
Build your own tool tip.
Much more flexible than using the default Focus ones. You can have as many rows in the tooltip as you want. It's all explained in the doc.

ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
SET HTMLENCODE=ON
SET ARGRAPHENGINE=JSCHART
SET EMBEDHEADING=ON
SET GRAPHDEFAULT=OFF
-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='240.0';
-DEFAULTH &WF_STYLE_WIDTH='460.0';
-DEFAULTH &WF_TITLE = 'WebFocus Report';

DEFINE FILE CAR
VAR /D5C = RETAIL_COST - DEALER_COST;
VAR_PCT /D5.2C = VAR / DEALER_COST * 100;
END
GRAPH FILE CAR
SUM VAR  AS 'Variance'
    COMPUTE DIMX      /A30V = COUNTRY;
    COMPUTE VARX      /A30V = FPRINT(VAR, 'D5C', 'A10V') || ' $';
    COMPUTE VAR_PCTX  /A20V = LJUST(12, FPRINT(VAR_PCT, 'D5.2C', 'A12V'), 'A12V') || ' %';
BY COUNTRY  AS 'Country'

ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET GRWIDTH 1
ON GRAPH SET UNITS &WF_STYLE_UNITS
ON GRAPH SET HAXIS &WF_STYLE_WIDTH
ON GRAPH SET VAXIS &WF_STYLE_HEIGHT
ON GRAPH SET LOOKGRAPH BAR
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $
TYPE=HEADING, JUSTIFY=CENTER, $
TYPE=HEADING, LINE=1, ITEM=1, OBJECT=TEXT, FONT='TIMES NEW ROMAN', SIZE=10, COLOR=RGB(8 97 74), STYLE=NORMAL, $
TYPE=DATA, COLUMN=N1,       BUCKET=x-axis, $
TYPE=DATA, COLUMN=VAR,      BUCKET=y-axis,  $
TYPE=DATA, COLUMN=DIMX,     BUCKET=tooltip, $
TYPE=DATA, COLUMN=VARX,     BUCKET=tooltip, $
TYPE=DATA, COLUMN=VAR_PCTX, BUCKET=tooltip, $
*GRAPH_JS_FINAL
series: [ {"series": 'reset', "tooltip": '{{tooltip1}}<br>{{tooltip2}}<br>{{tooltip3}}'} ],
htmlToolTip: {enable: true, snap: false }
*END
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
setDisplay(getY1Title(),false);
setDisplay(getY1Label(),false);
setDisplay(getY1AxisLine(),false);
setLabelStagger(getO1Label(),true);
setTextRotation(getO1Label(),3);
*END
ENDSTYLE
END
-RUN

This message has been edited. Last edited by: MartinY,


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Platinum Member
posted Hide Post
Martin - I wished it was that simple. You need to make the lookgraph a treemap instead of BAR. In the below sample I want Japan to ALWAYS appear first no matter unless there is no data. Change the value of seats or add a model criteria. At present the TREEMAP sorts by the sum value of the size and NOT the sort order.

ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
SET HTMLENCODE=ON
SET ARGRAPHENGINE=JSCHART
SET EMBEDHEADING=ON
SET GRAPHDEFAULT=OFF
-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='405.0';
-DEFAULTH &WF_STYLE_WIDTH='770.0';
-DEFAULTH &WF_TITLE='WebFOCUS Report';
GRAPH FILE car
-* Created by Info Assist for Graph
SUM CAR.BODY.SEATS
CAR.BODY.DEALER_COST
CAR.BODY.SALES
AVE.CAR.SPECS.MPG
BY HIGHEST CAR.ORIGIN.COUNTRY
BY CAR.COMP.CAR
WHERE CAR.ORIGIN.COUNTRY EQ 'ENGLAND' OR 'JAPAN';
WHERE CAR.BODY.SEATS EQ 4;
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET GRWIDTH 1
ON GRAPH SET AUTOFIT ON
ON GRAPH SET UNITS &WF_STYLE_UNITS
ON GRAPH SET HAXIS &WF_STYLE_WIDTH
ON GRAPH SET VAXIS &WF_STYLE_HEIGHT
ON GRAPH SET LOOKGRAPH TREEMAP
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPlace(true);
setDataTextDisplay(true);
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
*END
INCLUDE=Warm.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $
TYPE=DATA, COLUMN=N1, BUCKET=detail, $
TYPE=DATA, COLUMN=N2, BUCKET=detail, $
TYPE=DATA, COLUMN=N3, BUCKET=color, $
TYPE=DATA, COLUMN=N4, BUCKET=size, $
TYPE=DATA, COLUMN=N5, BUCKET=tooltip, $
TYPE=DATA, COLUMN=N6, BUCKET=tooltip, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
*GRAPH_JS_FINAL
"pieProperties": {
"holeSize": "0%"
},
"agnosticSettings": {
"chartTypeFullName": "Treemap"
}
*END
ENDSTYLE
END
-RUN


dksib
DC Tech Services Inc
WF 8.2.1M
 
Posts: 117 | Location: US | Registered: February 09, 2004Report This Post
Virtuoso
posted Hide Post
I don't think that it's possible since it goes against the TreeMap basic purpose : go from the greatest to lowest group.

Because England have greater values than Japan, England will always go first.


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Treemap Sort

Copyright © 1996-2020 Information Builders