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     [SOLVED] Scatter Plot with 4 Quadrants

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Scatter Plot with 4 Quadrants
 Login/Join
 
Platinum Member
posted
Hi Everyone,

I was wondering if there is a way to create a scatter plot with 4 quadrants in webfocus like the one in the image below? I have two columns with integer values and I need to create a 4 quadrant scatter plot. Thanks in advance.

Scatter chart Image

This message has been edited. Last edited by: FP Mod Chuck,


Webfocus 8105/8202
Windows
All Outputs
 
Posts: 106 | Registered: June 26, 2018Report This Post
Virtuoso
posted Hide Post
Yes. Use the Scatter plot and set a min and max for the X and Y axis that will create the 4 quadrants. Here's an example.

  

ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
-DEFAULTH &WF_HTMLENCODE=OFF;
SET HTMLENCODE=&WF_HTMLENCODE

SET ARGRAPHENGINE=JSCHART
-DEFAULTH &WF_EMPTYREPORT=ON;
SET EMPTYREPORT=&WF_EMPTYREPORT

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
-* Created by Info Assist for Graph
SUM WF_RETAIL.WF_RETAIL_SALES.DISCOUNT_US
WF_RETAIL.WF_RETAIL_SALES.GROSS_PROFIT_US
BY WF_RETAIL.WF_RETAIL_CUSTOMER.FULLNAME
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
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 SCATTER
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT

setPieDepth(0);
setPieTilt(0);
setDepthRadius(0); 
setCurveFitEquationDisplay(false); 
setPlace(true); 
setUseSeriesShapes(true);
setScaleMustIncludeZero(getX1Axis(), false);
setScaleMustIncludeZero(getY1Axis(), false);
setScaleMustIncludeZero(getY2Axis(), false);

*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, ORIENTATION=LANDSCAPE, $
TYPE=DATA, COLUMN=N1, BUCKET=detail, $
TYPE=DATA, COLUMN=N2, BUCKET=y-axis, $
TYPE=DATA, COLUMN=N3, BUCKET=x-axis, $
*GRAPH_SCRIPT

setReportParsingErrors(false);
setSelectionEnableMove(false);
setScaleMinAuto(getY1Axis(),false);
setScaleMin(getY1Axis(),-10000.0);
setScaleMaxAuto(getY1Axis(),false);
setScaleMax(getY1Axis(),10000.0);
setScaleMinAuto(getX1Axis(),false);
setScaleMin(getX1Axis(),-10000.0);
setScaleMaxAuto(getX1Axis(),false);
setScaleMax(getX1Axis(),10000.0);
*GRAPH_JS_FINAL
"pieProperties": {
    "holeSize": "0%"
},
"agnosticSettings": {
    "chartTypeFullName": "X_Y_Plots_Scatter"
}

*END
ENDSTYLE
END

-RUN


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Member
posted Hide Post
Can we set color for each of the quadrant


Version 8.2.03
Output : HTML, Excel & PDF
 
Posts: 23 | Registered: April 15, 2019Report This Post
Virtuoso
posted Hide Post
I doubt it.


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Member
posted Hide Post
On further research, I found the below link which shows different colors for each quadrant. They use getReferenceRect(), but i am not able to replicate it.

getReferenceRect()

 setBorderColor(getReferenceRect(0),new Color(255,111,111));
setDisplay(getReferenceRect(0),true);
setFillColor(getReferenceRect(0),new Color(255,111,111));  setX1(getReferenceRect(0),
0.0); setY1(getReferenceRect(0), 0.0); setX2(getReferenceRect(0),
0.5); setY2(getReferenceRect(0), 0.5);setReferencePercentageMode(getReferenceRect(0),true);

setDisplay(getReferenceRectText(0), true); 
setReferenceTextPosition(getReferenceRectText(0), 6); 
setTextString(getReferenceRectText(0), "Custom Peach  ");
  


Version 8.2.03
Output : HTML, Excel & PDF
 
Posts: 23 | Registered: April 15, 2019Report 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     [SOLVED] Scatter Plot with 4 Quadrants

Copyright © 1996-2020 Information Builders