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.
I am trying to order by HIGHEST TOTAl dollars, but for some odd reason instead of printing the state name on the y-axis, this prints the highest total dollars (as a number). This only happens on a heat map / spectral graph.
quote:
GRAPH FILE GGSALES SUM DOLLARS AS '' BY HIGHEST TOTAL DOLLARS NOPRINT BY ST ACROSS DATE AS '' ON GRAPH PCHOLD FORMAT JSCHART ON GRAPH SET HTMLENCODE ON ON GRAPH SET GRAPHDEFAULT OFF ON GRAPH SET ARGRAPHENGIN JSCHART ON GRAPH SET VZERO ON ON GRAPH SET GRWIDTH 1 ON GRAPH SET GRMERGE ON ON GRAPH SET GRMULTIGRAPH 0 ON GRAPH SET GRLEGEND 0 ON GRAPH SET GRXAXIS 1 ON GRAPH SET LOOKGRAPH SPECTRAL ON GRAPH SET AUTOFIT ON ON GRAPH SET STYLE * END
So, what I really want is the state to be on the y-axis, the date to be on the x-axis. The most dense colors should appear at the top of the heat map because it should be ordered by highest total dollars.
I have changed the GRXAXIS + the GRMERGE with no luck.This message has been edited. Last edited by: krhapner,
... state to be on the y-axis, the date to be on the x-axis. The most dense colors should appear at the top of the heat map because it should be ordered by highest total dollars...
There are probably different ways to do this.
Here is one possible approach.
SET ASNAMES = ON
-*
-* Summarize Dollars by State and by State/Date
-*
TABLE FILE GGSALES
SUM DOLLARS
BY HIGHEST TOTAL DOLLARS AS 'TOTAL_DOLLARS'
BY ST
SUM DOLLARS AS 'DAY_DOLLARS'
BY HIGHEST TOTAL DOLLARS
BY ST
BY DATE
ON TABLE HOLD AS HOLD1
END
-RUN
-*
-* Create Yaxis (State) Labels.
-*
TABLE FILE HOLD1
PRINT TOTAL_DOLLARS
DATE
DAY_DOLLARS
ST
COMPUTE ST_YAXIS/I2 = IF ST EQ LAST ST THEN ST_YAXIS ELSE ST_YAXIS + 1;
COMPUTE NEW_ST/A100 = '/*' | EDIT(ST_YAXIS) | '*/' | ST;
ON TABLE HOLD AS HOLD2
END
-RUN
-*
-* Create Spectral Visualization.
-*
GRAPH FILE HOLD2
SUM DAY_DOLLARS AS ''
BY NEW_ST AS 'State'
ACROSS DATE AS ''
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET LOOKGRAPH SPECTRAL
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 2
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
-*
*GRAPH_SCRIPT
setLegendPosition(2);
setToolTipStyle('html5');
*END
-*
*GRAPH_JS
title: {text: 'Sales Heat Map', visible: true},
subtitle: {text: 'Sales By Highest State Across Date', visible: true},
yaxis: {title: {visible: true, text:'Sales'}},
xaxisOrdinal: {title: {visible: true, text:'Date'}}
*END
ENDSTYLE
END
-EXIT