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] Consistent Axis For Graphs (in 8.2)

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Consistent Axis For Graphs (in 8.2)
 Login/Join
 
Expert
posted
Where's the setting to make the axis consistent in the following simple graphs? I need to use a consistent axis, say 1 in this case, for all individual graphs.

Run the following code and see that it produces graphs with an axis of 0.5, 0.6, and 0.45. I need the axis to be, for example, 1 for all graphs
GRAPH FILE car
SUM 
COMPUTE RPCT/D6 = RETAIL_COST / 100000 ;
COMPUTE DPCT/D6 = DEALER_COST / 100000 ;
WHERE CAR.ORIGIN.COUNTRY EQ 'ENGLAND';
ON GRAPH HOLD AS GRAPH1 FORMAT JSCHART
END
-RUN
GRAPH FILE car
SUM COMPUTE RPCT/D6 = RETAIL_COST / 100000 ;
WHERE CAR.ORIGIN.COUNTRY EQ 'ENGLAND';
ON GRAPH HOLD AS GRAPH2 FORMAT JSCHART
END
-RUN
GRAPH FILE car
SUM COMPUTE DPCT/D6 = DEALER_COST / 100000 ;
WHERE CAR.ORIGIN.COUNTRY EQ 'ENGLAND';
ON GRAPH HOLD AS GRAPH3 FORMAT JSCHART
END
-RUN
-HTMLFORM BEGIN
!IBI.FIL.GRAPH1;
!IBI.FIL.GRAPH2;
!IBI.FIL.GRAPH3;
-HTMLFORM END
Yes, I stripped out all the styling for simplicity.

Can this be done in the GUI?

Thanks, in advance, Doug

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




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Virtuoso
posted Hide Post
It can be created in the GUI. The syntax for setting a Y Axis Max is:

setScaleMaxAuto(getY1Axis(),false);
setScaleMax(getY1Axis(),1.0);

GRAPH FILE car
SUM 
COMPUTE RPCT/D6 = RETAIL_COST / 100000 ;
COMPUTE DPCT/D6 = DEALER_COST / 100000 ;
WHERE CAR.ORIGIN.COUNTRY EQ 'ENGLAND';
ON GRAPH PCHOLD AS GRAPH1 FORMAT JSCHART
ON GRAPH SET LOOKGRAPH BAR
ON GRAPH SET STYLE *

*GRAPH_SCRIPT

setReportParsingErrors(false);
setSelectionEnableMove(false);
setScaleMaxAuto(getY1Axis(),false);
setScaleMax(getY1Axis(),1.0);

*END
END


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Expert
posted Hide Post
The missing piece was "setColorMode(2);" in the following code:
setColorMode(2);
setFillColor(getSeries(0),new Color(098,128,098));
setFillColor(getSeries(1),new Color(230,230,000));
setFillColor(getSeries(2),new Color(128,128,255));
The last three lines are the colors for the series.
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Expert
posted Hide Post
I hope you can see the final result using This Link. I just added it .

This message has been edited. Last edited by: Doug,
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Expert
posted Hide Post
Here's the latest, formatted, version, Just for Show.

This message has been edited. Last edited by: Doug,
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Virtuoso
posted Hide Post
Nice, except if it's as requested, personally I would match bar's color and column header's color to make an easy color reference match.

Also I would give more spaces between bar and percentage value.

Just some suggestions but I don't know your requirement.


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
Expert
posted Hide Post
Thanks for your suggestions Martin,

However, the column titles, right four columns, do match, RGB / Hex values. Do you see it not matching?

I used the default for placing the value to the right of the bars. So, it is what it is (not worth the extra effort.


Besides, this is a remake of an existing report and looks a lot better than the original (IMHO, as well as others).

Smiler Doug




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Expert
posted Hide Post
PS: Happy Anniversary! in FOCUS since 2007
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Virtuoso
posted Hide Post
Hi Doug,
Yesterday your sample wasn't the same color when today it is.

It seems that pervious custom data label positioning option available in WF7 is not anymore available in WF8. I've pasted WF7 code into a WF8 graph and the custom position have no effect :-(

And thank you for mentioning my ten years in Focus, which just happened in February. I did not realize myself ..


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
  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] Consistent Axis For Graphs (in 8.2)

Copyright © 1996-2020 Information Builders