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] GRAPH - Maximum Scale value for axis based on BY field

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] GRAPH - Maximum Scale value for axis based on BY field
 Login/Join
 
Gold member
posted
I am using WF8105m version and created a multiple Y axis (bar & Line) Graph in PPTX and it will generate each graph based on first BY field .

I need to set Maximum scale value for Y2 axis for each graph based on BY field values.

Is there any way for achieve this.?

Below is the example using CAR file.

In this graph i am generating multiple graphs for each country.I need to set maximum scale value for Y2 axis for only two countries

Thanks in Advance.

GRAPH FILE CAR
SUM CAR.BODY.DEALER_COST AS 'Sum of Dealer Cost'
CAR.BODY.RETAIL_COST AS 'Sum of Retail Cost'
CAR.BODY.SALES AS 'Sum of Sales'
COMPUTE RETAIL_PCT/P12% = IF SALES/RETAIL_COST*100 GT 100 THEN 98 ELSE SALES/RETAIL_COST*100; AS 'Average of Dealer Cost'
COMPUTE DEALER_PCT/P12% = IF SALES/DEALER_COST*100 GT 100 THEN 90 ELSE SALES/DEALER_COST*100; AS 'Average of Retail Cost'
COMPUTE SALES_PCT/P12% = IF SALES/(RETAIL_COST+DEALER_COST)*100 GT 100 THEN 95 ELSE SALES/(RETAIL_COST+DEALER_COST)*100; AS 'Average of Sales'
BY CAR.ORIGIN.COUNTRY
BY CAR
HEADING
"<COUNTRY"
ON GRAPH PCHOLD FORMAT PPTX
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH VBAR2AX
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING,ORIENTATION=LANDSCAPE, PAGESIZE=PPT-SLIDE, $
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setCurveFitEquationDisplay(false);
setPlace(true);

setReportParsingErrors(false);
setSelectionEnableMove(false);
setY1AxisLineDisplay(true);
setY2AxisLineDisplay(true);
setO1AxisLineDisplay(true);
setO2AxisLineDisplay(true);
setAxisAssignment( getSeries(0), 1);
setAxisAssignment( getSeries(1), 1);
setAxisAssignment( getSeries(2), 1);
setAxisAssignment( getSeries(3), 0);
setAxisAssignment( getSeries(4), 0);
setAxisAssignment( getSeries(5), 0);
setFillColor(getSeries(0),new Color(#1F4E79));
setFillColor(getSeries(1),new Color(#70AD47));
setFillColor(getSeries(2),new Color(#ED7D31));
setFillColor(getSeries(3),new Color(#1F4E79));
setFillColor(getSeries(4),new Color(#70AD47));
setFillColor(getSeries(5),new Color(#ED7D31));
setSeriesType(3,2);
setSeriesType(4,2);
setSeriesType(5,2);
setMarkerSizeDefault(90);
setMarkerShape(getSeries(3), 2);
setMarkerShape(getSeries(4), 2);
setMarkerShape(getSeries(5), 2);
setLegendPosition(11);
setDisplay(getY1MajorGrid(),false);
setDisplay(getX1MajorGrid(),false);
setTextFormatPreset(getY1Label(),28);
setFrameDisplay(false);
setMarkerShape(getSeries(0), 1);
setMarkerShape(getSeries(1), 1);
setMarkerShape(getSeries(2), 1);
setMarkerShape(getSeries(3), 2);
setMarkerShape(getSeries(4), 2);
setMarkerShape(getSeries(5), 2);
setUseSeriesShapes(true);
setY1ScaleMax(100);
setY1ScaleMaxAuto(false);
-*setSmoothLines(true);
*GRAPH_JS
"riserBevel": "none"
,
*END
ENDSTYLE
END
-RUN

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


WebFOCUS 8201m
Windows,AppStudio, DevStudio,All Outputs
 
Posts: 86 | Location: India | Registered: November 03, 2015Report This Post
Virtuoso
posted Hide Post
The following should work

GRAPH FILE CAR
SUM CAR.BODY.DEALER_COST AS 'Sum of Dealer Cost'
    CAR.BODY.RETAIL_COST AS 'Sum of Retail Cost'
    CAR.BODY.SALES AS 'Sum of Sales'
    COMPUTE RETAIL_PCT/P12% = IF SALES/RETAIL_COST*100 GT 100 THEN 98 ELSE SALES/RETAIL_COST*100; AS 'Average of Dealer Cost'
    COMPUTE DEALER_PCT/P12% = IF SALES/DEALER_COST*100 GT 100 THEN 90 ELSE SALES/DEALER_COST*100; AS 'Average of Retail Cost'
    COMPUTE SALES_PCT/P12% = IF SALES/(RETAIL_COST+DEALER_COST)*100 GT 100 THEN 95 ELSE SALES/(RETAIL_COST+DEALER_COST)*100; AS 'Average of Sales'

    COMPUTE MAXVAL  /P20  = IF COUNTRY EQ 'FRANCE' THEN 3000 ELSE IF COUNTRY EQ 'JAPAN' THEN 40000 ELSE 999999; NOPRINT
    COMPUTE AUTOMAX /A5   = IF COUNTRY EQ 'FRANCE' OR 'JAPAN' THEN 'false'  ELSE 'true'; NOPRINT

BY COUNTRY
BY CAR
HEADING
"<COUNTRY"
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH VBAR2AX
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING,ORIENTATION=LANDSCAPE, PAGESIZE=PPT-SLIDE, $

COLUMN=N9,  ITEM=1, GRAPH-COMMAND='setScaleMax(getY2Axis(),$VALUE)', $
COLUMN=N10, ITEM=1, GRAPH-COMMAND='setScaleMaxAuto(getY2Axis(),$VALUE)', $

*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setCurveFitEquationDisplay(false);
setPlace(true);

setReportParsingErrors(false);
setSelectionEnableMove(false);
setY1AxisLineDisplay(true);
setY2AxisLineDisplay(true);
setO1AxisLineDisplay(true);
setO2AxisLineDisplay(true);
setAxisAssignment( getSeries(0), 1);
setAxisAssignment( getSeries(1), 1);
setAxisAssignment( getSeries(2), 1);
setAxisAssignment( getSeries(3), 0);
setAxisAssignment( getSeries(4), 0);
setAxisAssignment( getSeries(5), 0);
setFillColor(getSeries(0),new Color(#1F4E79));
setFillColor(getSeries(1),new Color(#70AD47));
setFillColor(getSeries(2),new Color(#ED7D31));
setFillColor(getSeries(3),new Color(#1F4E79));
setFillColor(getSeries(4),new Color(#70AD47));
setFillColor(getSeries(5),new Color(#ED7D31));
setSeriesType(3,2);
setSeriesType(4,2);
setSeriesType(5,2);
setMarkerSizeDefault(90);
setMarkerShape(getSeries(3), 2);
setMarkerShape(getSeries(4), 2);
setMarkerShape(getSeries(5), 2);
setLegendPosition(11);
setDisplay(getY1MajorGrid(),false);
setDisplay(getX1MajorGrid(),false);
setTextFormatPreset(getY1Label(),28);
setFrameDisplay(false);
setMarkerShape(getSeries(0), 1);
setMarkerShape(getSeries(1), 1);
setMarkerShape(getSeries(2), 1);
setMarkerShape(getSeries(3), 2);
setMarkerShape(getSeries(4), 2);
setMarkerShape(getSeries(5), 2);
setUseSeriesShapes(true);
setY1ScaleMax(100);
setY1ScaleMaxAuto(false);
-*setSmoothLines(true);
*GRAPH_JS
"riserBevel": "none"
,
*END
ENDSTYLE
END
-RUN


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
Gold member
posted Hide Post
Hi Martin,

Thanks for your reply!!

Your code working fine in JSCHART Output format. But it didn't worked with PPTX output format.

Exactly we need the same output in Power Point (PPTX format).
ON GRAPH PCHOLD FORMAT PPTX


Thanks.

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


WebFOCUS 8201m
Windows,AppStudio, DevStudio,All Outputs
 
Posts: 86 | Location: India | Registered: November 03, 2015Report This Post
Virtuoso
posted Hide Post
Maran

I suggest opening a case with techsupport to get an answer for this.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 2127 | Location: Customer Support | Registered: April 12, 2005Report 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] GRAPH - Maximum Scale value for axis based on BY field

Copyright © 1996-2020 Information Builders