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     conditional styling on a scatter graph

Read-Only Read-Only Topic
Go
Search
Notify
Tools
conditional styling on a scatter graph
 Login/Join
 
Silver Member
posted
We are trying to do a conditional styling on a scatter graph but it does not work. On changing to a bar graph the styling starts working.
Below is a sample code with the car master file:

GRAPH FILE CAR
SUM CNT.CAR
ACROSS COUNTRY
ON GRAPH SET LOOKGRAPH SCATTERS
ON GRAPH SET GRAPHEDIT SERVER
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF
ON GRAPH SET VZERO ON
ON GRAPH SET GRID ON
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET GRAPHSTYLE *
setMarkerDisplay(true);
setConnectLineMarkers(false);
setConnectScatterMarkers(false);
setO1LabelDisplay(true);
setO1AxisSide(0);
setO1MajorGridDisplay(true);
setO1MajorGridStyle(0);
setO1MinorGridDisplay(false);
setAxisAssignment(0,0);
setSeriesType(0,0);
setY1LabelDisplay(true);
setY1AxisSide(0);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
setTextFormatPreset(getY1Label(),-1);
setTextFormatPattern(getY1Label(),"#.##");
setPieFeelerTextDisplay(1);
setPieLabelDisplay(0);
setTextFormatPreset(getPieSliceLabel(),1);
setRiserBorderMode(1);
setSeriesDefaultTransparentBorderColor(true);
setUseSeriesBorderDefaults(true);
setLegendDisplay(true);
setLegendTextAutofit(true);
setFontSizeAbsolute(getY1Title(),true);
setFontSizeAbsolute(getY1Label(),true);
setFontSizeAbsolute(getY2Title(),true);
setFontSizeAbsolute(getY2Label(),true);
setFontSizeAbsolute(getO1Title(),true);
setO1LabelAutofit(true);
setPlace(false);
ENDSTYLE
ON GRAPH SET STYLE *
PAGESIZE='Letter',
LEFTMARGIN=0.250000,
RIGHTMARGIN=0.250000,
TOPMARGIN=0.250000,
BOTTOMMARGIN=0.250000,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
DEFMACRO=COND0001,
MACTYPE=RULE,
WHEN=N1 LE 4,
$
TYPE=REPORT,
GRID=OFF,
FONT='TIMES NEW ROMAN',
SIZE=10,
BACKCOLOR='NONE',
STYLE=NORMAL,
$
TYPE=DATA,
ACROSSCOLUMN=N1,
COLOR=RGB(0 51 0),
MACRO=COND0001,
$
ENDSTYLE
END

But if I change from
ON GRAPH SET LOOKGRAPH SCATTERS
to
ON GRAPH SET LOOKGRAPH BAR
the conditions apply and the styling works correctly.


WF dev version - 7.6.x
 
Posts: 29 | Registered: February 15, 2006Report This Post
Silver Member
posted Hide Post
Tony, I tried replacing N1 with C2 .
But it didn't work.

GRAPH FILE CAR
SUM CNT.CAR
ACROSS COUNTRY
ON GRAPH SET LOOKGRAPH SCATTERS
ON GRAPH SET GRAPHEDIT SERVER
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF
ON GRAPH SET VZERO ON
ON GRAPH SET GRID ON
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET GRAPHSTYLE *
setMarkerDisplay(true);
setConnectLineMarkers(false);
setConnectScatterMarkers(false);
setO1LabelDisplay(true);
setO1AxisSide(0);
setO1MajorGridDisplay(true);
setO1MajorGridStyle(0);
setO1MinorGridDisplay(false);
setAxisAssignment(0,0);
setSeriesType(0,0);
setY1LabelDisplay(true);
setY1AxisSide(0);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
setTextFormatPreset(getY1Label(),-1);
setTextFormatPattern(getY1Label(),"#.##");
setPieFeelerTextDisplay(1);
setPieLabelDisplay(0);
setTextFormatPreset(getPieSliceLabel(),1);
setRiserBorderMode(1);
setSeriesDefaultTransparentBorderColor(true);
setUseSeriesBorderDefaults(true);
setLegendDisplay(true);
setLegendTextAutofit(true);
setFontSizeAbsolute(getY1Title(),true);
setFontSizeAbsolute(getY1Label(),true);
setFontSizeAbsolute(getY2Title(),true);
setFontSizeAbsolute(getY2Label(),true);
setFontSizeAbsolute(getO1Title(),true);
setO1LabelAutofit(true);
setPlace(false);
ENDSTYLE
ON GRAPH SET STYLE *
PAGESIZE='Letter',
LEFTMARGIN=0.250000,
RIGHTMARGIN=0.250000,
TOPMARGIN=0.250000,
BOTTOMMARGIN=0.250000,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
DEFMACRO=COND0001,
MACTYPE=RULE,
WHEN=C2 LE 3,
$
TYPE=REPORT,
GRID=OFF,
FONT='TIMES NEW ROMAN',
SIZE=10,
BACKCOLOR='NONE',
STYLE=NORMAL,
$
TYPE=DATA,
COLOR=RGB(255 51 030),
MACRO=COND0001,
$
ENDSTYLE
END


WF dev version - 7.6.x
 
Posts: 29 | Registered: February 15, 2006Report This Post
Expert
posted Hide Post
I know, that's why I deleted the post!

If I have time later, then I will see if I can fathom it out.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Master
posted Hide Post
Tried your code against my server. It works fine. If I understand, this is where you are doing condition then it works fine for me for both bar and scatters.

TYPE=DATA,ACROSSCOLUMN=N1,COLOR=RGB(0 51 0),
MACRO=COND0001,$


WFConsultant

WF 8105M on Win7/Tomcat
 
Posts: 780 | Location: Florida | Registered: January 09, 2005Report This Post
Expert
posted Hide Post
Kamesh,

That's what I thought initially, and then I realised all values were 3 or less and therefore changed the condition to be LE 2. Try it and see that the markers are still all red even though they are not all 2 or less.

Add a new line to color the markers to blue (or some other colour) to double check.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
<JG>
posted
Sorry it's got to be another API call as markers do not behave the same as risers.

(although in this particular case you must reference the markers as risers.
Not totally logical but then again java is an island, coffee or a programming language
depending on your age and interests. So it's not surprising that some implementers get
confused and so make it very difficult for those of us who have to use it).

look at the following example using the car file

TABLE FILE CAR
SUM CNT.CAR NOPRINT
COMPUTE COUNTER/I9= LAST COUNTER +1; NOPRINT
-* required because the java API starts counting from 0
COMPUTE COUNTER/I9= COUNTER -1; NOPRINT
COMPUTE FRED/A100= IF C1 LE 2 THEN 'setExceptionalRiser(0,' || EDIT(C3) || '); ' | 'setFillColor(getExceptionalRiser(0,' || EDIT(C3) || '),new Color(255,0,0));' ELSE ' ';
BY COUNTRY NOPRINT
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE SAVE
END
-RUN
GRAPH FILE CAR
SUM CNT.CAR
ACROSS COUNTRY
ON GRAPH SET LOOKGRAPH SCATTERS
ON GRAPH SET GRAPHEDIT OFF
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF
ON GRAPH SET VZERO ON
ON GRAPH SET GRID ON
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET GRAPHSTYLE *
setMarkerDisplay(true);
setConnectLineMarkers(false);
setConnectScatterMarkers(false);
setO1LabelDisplay(true);
setSeriesType(0,0);
setY1LabelDisplay(true);
setY1AxisSide(0);
setY1MinorGridDisplay(false);
setLegendDisplay(true);

-INCLUDE SAVE

setPlace(false);
ENDSTYLE
ON GRAPH SET STYLE *
PAGESIZE='Letter',
LEFTMARGIN=0.250000,
RIGHTMARGIN=0.250000,
TOPMARGIN=0.250000,
BOTTOMMARGIN=0.250000,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
GRID=OFF,
FONT='TIMES NEW ROMAN',
SIZE=10,
BACKCOLOR='NONE',
STYLE=NORMAL,
$
ENDSTYLE
END

This message has been edited. Last edited by: <JG>,
 
Report This Post
Silver Member
posted Hide Post
Thanks JG... It worked ...


WF dev version - 7.6.x
 
Posts: 29 | Registered: February 15, 2006Report 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     conditional styling on a scatter graph

Copyright © 1996-2020 Information Builders