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] Adding 2nd axis changes graph - URGENT - Please help

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Adding 2nd axis changes graph - URGENT - Please help
 Login/Join
 
Master
posted
Hello

This is sample code with CAR and everything works as I need. Now, I am trying to add another series (series type is line) and it messes the graph. Can you please suggest? Assume new series to be DEALER_COST.

New graph's legend should show line and respective text (Dealer Cost) along with existing three colors with the country name.

DEFINE FILE CAR
 MYCOUNTRY/A50=IF COUNTRY EQ 'ITALY' THEN 'ITALY Amount' ELSE IF COUNTRY EQ 'JAPAN' THEN 'JAPAN Amount' ELSE IF COUNTRY EQ 'W GERMANY' THEN 'W GERMANY Amount';
END
GRAPH FILE CAR
SUM
CAR.BODY.RETAIL_COST
BY MYCOUNTRY NOPRINT
ACROSS CAR.COMP.CAR
WHERE COUNTRY EQ 'ITALY' OR 'JAPAN' OR 'W GERMANY';
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET ARGRAPHENGIN JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 1
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH VBRSTK1
ON GRAPH SET STYLE *
*GRAPH_SCRIPT

setPieDepth(0);
setPieTilt(0);
setDepthRadius(0); 
setCurveFitEquationDisplay(false); 
setPlace(true); 

*END
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
setFillColor(getSeries(0), new Color(255,0,0));
setFillColor(getSeries(1), new Color(0,255,0));
setFillColor(getSeries(2), new Color(255,255,0));

*END
ENDSTYLE
END

-RUN

This message has been edited. Last edited by: <Kathryn Henning>,


8.1.05
HTML,PDF,EXL2K, Active, All
 
Posts: 484 | Registered: February 03, 2009Report This Post
<nick z>
posted
Hi,
You can try something like this:
But this will only work in PNG.
JSCHART does not yet support extra legend markers.

DEFINE FILE CAR
 MYCOUNTRY/A50=IF COUNTRY EQ 'ITALY' THEN 'ITALY Amount' ELSE IF COUNTRY EQ 'JAPAN' THEN 'JAPAN Amount' ELSE IF COUNTRY EQ 'W GERMANY' THEN 'W GERMANY Amount' ;
END

GRAPH FILE CAR
SUM CAR.BODY.RETAIL_COST
CAR.BODY.DEALER_COST
BY CAR.ORIGIN.COUNTRY NOPRINT
BY CAR.COMP.CAR
WHERE CAR.ORIGIN.COUNTRY EQ 'ITALY' OR 'JAPAN' OR 'W GERMANY';
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET ARGRAPHENGIN JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 2
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET STYLE *
*GRAPH_SCRIPT

setPieDepth(0);
setPieTilt(0);
setDepthRadius(0); 
setCurveFitEquationDisplay(false); 
setPlace(true); 

*END

DEFMACRO=Condition_1, MACTYPE=RULE, WHEN=N1 EQ 'ITALY', $
DEFMACRO=Condition_2, MACTYPE=RULE, WHEN=N1 EQ 'JAPAN', $
DEFMACRO=Condition_3, MACTYPE=RULE, WHEN=N1 EQ 'W GERMANY', $
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $
TYPE=DATA, COLUMN=N3, MACRO=Condition_1, COLOR=RGB(255 0 0), $
TYPE=DATA, COLUMN=N3, MACRO=Condition_2, COLOR=RGB(0 255 0), $
TYPE=DATA, COLUMN=N3, MACRO=Condition_3, COLOR=RGB(255 255 0), $
*GRAPH_SCRIPT

setReportParsingErrors(false);
setSelectionEnableMove(false);
setFillColor(getSeries(0), new Color(255,0,0));
setFillColor(getSeries(2), new Color(255,255,0));
setConnectLineMarkers(true);
setLineStyleLegendMarkers(2);
setUseSeriesShapes(true);
setMarkerShape(getAllSeries(),2);
setSeriesType(1,2);
setFillColor(getSeries(1),new Color(0,0,255));
setLegendSeriesStart(1);
setTextString(getLegendLabel(0),"ITALY Amount");
setDisplay(getLegendLabel(0),true);
setTextString(getLegendLabel(1),"JAPAN Amount");
setDisplay(getLegendLabel(1),true);
setTextString(getLegendLabel(2),"W GERMANY Amount");
setDisplay(getLegendLabel(2),true);
setMarkerShape(getLegendLabelMarker(0),1);
setMarkerShape(getLegendLabelMarker(1),1);
setMarkerShape(getLegendLabelMarker(2),1);
setFillColor(getLegendLabelMarker(0),new Color(255,0,0));
setFillColor(getLegendLabelMarker(1),new Color(0,255,0));
setFillColor(getLegendLabelMarker(2),new Color(255,255,0));


*END
ENDSTYLE
END

-RUN




Thank you.
Nick.
 
Report This Post
Master
posted Hide Post
Nick

I customized it to my report with 2 axis and everything is looking good.

Thanks a lot..


8.1.05
HTML,PDF,EXL2K, Active, All
 
Posts: 484 | Registered: February 03, 2009Report This Post
<nick z>
posted
Great!
I am glad I can help.
 
Report This Post
Master
posted Hide Post
quote:
Originally posted by nick z:
Great!
I am glad I can help.


Nick, I was trying to remove border color of bars or make it white. but code does not allow me too. webfocus style sheet code is over-riding below code..

setSeriesDefaultTransparentBorderColor(true);
setUseSeriesBorderDefaults(true);
 


so, I tried adding BORDER-COLOR properties to webfocus style sheet and it doesn't change. I get black border for bars that are specified in conditional formating.
GRAPH FILE CAR
SUM
	DEALER_COST AS ''
	RETAIL_COST AS ''
BY COUNTRY NOPRINT
BY CAR AS ''
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET ARGRAPHENGIN JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 2
ON GRAPH SET LOOKGRAPH VBAR2AX
ON GRAPH SET STYLE *

DEFMACRO=Condition_1, MACTYPE=RULE, WHEN=COUNTRY EQ 'ITALY', $
DEFMACRO=Condition_2, MACTYPE=RULE, WHEN=COUNTRY EQ 'FRANCE', $
DEFMACRO=Condition_3, MACTYPE=RULE, WHEN=COUNTRY EQ 'JAPAN', $
TYPE=DATA, COLUMN=N3, MACRO=Condition_1, COLOR=RGB(201 199 166), $
TYPE=DATA, COLUMN=N3, MACRO=Condition_2, COLOR=RGB(243 93 19),  $
TYPE=DATA, COLUMN=N3, MACRO=Condition_3, COLOR=RGB(130 184 201),  $
*GRAPH_SCRIPT
setSeriesDefaultTransparentBorderColor(true);
setUseSeriesBorderDefaults(true);
-*setBorderColor(getAllSeries(),new Color(255,255,255));
*END
ENDSTYLE
END





any suggestions?

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


8.1.05
HTML,PDF,EXL2K, Active, All
 
Posts: 484 | Registered: February 03, 2009Report This Post
<nick z>
posted
Yes,
add:

setTransparentBorderColor(getSeries(0),true);
 
Report This Post
Master
posted Hide Post
Perfect. Man, there are lot of APIs with graphs..this is my first experience with graphs..
quote:
Originally posted by nick z:
Yes,
add:

setTransparentBorderColor(getSeries(0),true);


8.1.05
HTML,PDF,EXL2K, Active, All
 
Posts: 484 | Registered: February 03, 2009Report 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] Adding 2nd axis changes graph - URGENT - Please help

Copyright © 1996-2020 Information Builders