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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
Graph Question
 Login/Join
 
Master
posted
I am trying to set the Y1 axis with the maximum amount. The problem I am getting is, the interval is showing based on the maximum amount value but the top one shows the nearest amount and stops the Y1 axis with the maximum amount.

Ex: the Y1 axis is shown as below,
4M *(3.59M)
3M
2M
*(1.78M)
1M *(1M)
0

The graph should show as below,

4M
*(3.59M)
3M
2M
*(1.78M)
1M *(1M)
0

Hope I put my questions in proper manner,


WFConsultant

WF 8105M on Win7/Tomcat
 
Posts: 780 | Location: Florida | Registered: January 09, 2005Report This Post
Virtuoso
posted Hide Post
no, I don't understand this...

please try to post a real example of the graph and maybe the script how you got it.

To post an image you have to upload the image to a public site.




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Expert
posted Hide Post
Kamesh,

You would need to turn off the Max scale auto and then set it to a value that you require, If this is variable then you would need to perform a small extract to obtain the max value you require.

The Java code for this would be something like -

setY1ScaleMax(&Max);
setY1ScaleMaxAuto(false);

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
That's what I did Tony but it ends with the maximum value. I mean if the maximum value is 75k and the Y1 axis interval increases with 10k, the Y1 axis shows 80k but it stops at 75k.


WFConsultant

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

Put together an example using one of the sample database (such as GGSALES) with the minimal code to demonstrate what you are doing.

I would expect to see something like this and not much more for an example piece -
-SET &Max = 18000;
-RUN

GRAPH FILE GGSALES
SUM DOLLARS
    BUDDOLLARS
BY REGION
ON GRAPH SET GRAPHEDIT SERVER
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF
ON GRAPH SET VZERO OFF
ON GRAPH SET GRID ON
ON GRAPH SET GRAPHSTYLE *
setGraphType(45);
setY1ScaleMax(&Max);
setY1ScaleMaxAuto(false);
ENDSTYLE
END
-RUN


If you can't get it stripped down to a reasonable size, then just remove code whilst it still displays your problem and then post.

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
The sample code is below. If you see the output, the Y1 axis will end with $195,587 but it should go up to 200k.

SET HAXIS=900
SET VAXIS=510
SET GRMERGE=ON
SET GRAPHEDIT = SERVER

GRAPH FILE GGSALES
SUM UNITS DOLLARS
BY REGION
ACROSS PRODUCT
WHERE RECORDLIMIT EQ 10
ON GRAPH SET GRAPHSTYLE *
setPlace(true);
setTextString (getTitle(),"BY REGION");
setY1TitleString("TEST");
setO1TitleString("TEST STRING");

setPlaceResize(getO1Label(),0);
setFontSizeAbsolute(getO1Label(),true);

setDataTextDisplay(true);
setFillMissingData(0);

setY1ScaleMaxAuto(false);
setScaleMax(getY1Axis(), 195587 );
ENDSTYLE
END
-EXIT


WFConsultant

WF 8105M on Win7/Tomcat
 
Posts: 780 | Location: Florida | Registered: January 09, 2005Report This Post
Virtuoso
posted Hide Post
quote:
setScaleMax(getY1Axis(), 195587 );

this is what you say and that is what the report does.

change it in

setScaleMax(getY1Axis(), 200000 );

and see if this helps




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Master
posted Hide Post
The problem is I dont know the maximum value. I am setting it dynamincally based on data.


WFConsultant

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

If you are setting it dynamically then I guess that you are performing a previous extract, saving the output and reading it into a variable? If so then just round it up to the next value you want. i.e. if your max value extracted is 195 and you want to have the max at 200 then newmax = int((extr_max / 100) + .5) * 100 or something of the ilk.

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
Thanks Tony for your idea. It's sounds like working with some modification.

-SET &MAXTOT=195587;
-SET &MAXTOT1=IF &MAXTOT NE 0 THEN &MAXTOT/100 ELSE 0;
-SET &MAXTOTLEN=IF &MAXTOT NE 0 THEN ARGLEN(21,&MAXTOT1,'I8') ELSE 1;
-SET &MAXTOT=IF &MAXTOTLEN EQ 1 THEN INT((&MAXTOT1+.5)*100)
- ELSE IF &MAXTOTLEN EQ 2 THEN INT((&MAXTOT1+5)*100)
- ELSE IF &MAXTOTLEN EQ 3 THEN INT((&MAXTOT1+50)*100)
- ELSE IF &MAXTOTLEN EQ 4 THEN INT((&MAXTOT1+500)*100)
- ELSE IF &MAXTOTLEN EQ 5 THEN INT((&MAXTOT1+5000)*100)
- ELSE IF &MAXTOTLEN EQ 6 THEN INT((&MAXTOT1+50000)*100)
- ELSE IF &MAXTOTLEN EQ 7 THEN INT((&MAXTOT1+500000)*100)
- ELSE IF &MAXTOTLEN EQ 8 THEN INT((&MAXTOT1+5000000)*100)
- ELSE IF &MAXTOTLEN EQ 9 THEN INT((&MAXTOT1+50000000)*100)
- ELSE &MAXTOT;

SET HAXIS=900
SET VAXIS=510
SET GRMERGE=ON
SET GRAPHEDIT = SERVER

GRAPH FILE GGSALES
SUM UNITS DOLLARS
BY REGION
ACROSS PRODUCT
WHERE RECORDLIMIT EQ 10
ON GRAPH SET GRAPHSTYLE *
setPlace(true);
setTextString (getTitle(),"BY REGION");
setY1TitleString("TEST");
setO1TitleString("TEST STRING");

setPlaceResize(getO1Label(),0);
setFontSizeAbsolute(getO1Label(),true);

setDataTextDisplay(true);
setFillMissingData(0);

setY1ScaleMaxAuto(false);
setScaleMax(getY1Axis(), &MAXTOT );
ENDSTYLE
END
-EXIT


WFConsultant

WF 8105M on Win7/Tomcat
 
Posts: 780 | Location: Florida | Registered: January 09, 2005Report This Post
Master
posted Hide Post
This solution works perfect. The idea I got it from this link

https://forums.informationbuilders.com/eve/forums/a/tpc/...811018331#3811018331

The modified code is below,

DEFINE FUNCTION D_ROUND(NUMBER/D12.2, BASE/D8)
TMPNUM/D12 = NUMBER;
REMAINDER/D8 = DMOD(NUMBER, BASE, REMAINDER);
TESTVAL/D8 = BASE/2;

RETVAL/D12 = IF REMAINDER GE TESTVAL THEN
TMPNUM + (BASE - REMAINDER)
ELSE TMPNUM + REMAINDER;

D_ROUND/D12 = RETVAL;
END

-SET &MAXTOT=195587;

-SET &MAXTOTLEN=IF &MAXTOT NE 0 THEN ARGLEN(21,&MAXTOT,'I8') ELSE 1;

-SET &MAXTOT=IF &MAXTOTLEN EQ 2 THEN D_ROUND(&MAXTOT,1)
- ELSE IF &MAXTOTLEN EQ 3 THEN D_ROUND(&MAXTOT,10)
- ELSE IF &MAXTOTLEN EQ 4 THEN D_ROUND(&MAXTOT,100)
- ELSE IF &MAXTOTLEN EQ 5 THEN D_ROUND(&MAXTOT,1000)
- ELSE IF &MAXTOTLEN EQ 6 THEN D_ROUND(&MAXTOT,10000)
- ELSE IF &MAXTOTLEN EQ 7 THEN D_ROUND(&MAXTOT,100000)
- ELSE IF &MAXTOTLEN EQ 8 THEN D_ROUND(&MAXTOT,1000000)
- ELSE IF &MAXTOTLEN EQ 9 THEN D_ROUND(&MAXTOT,10000000)
- ELSE &MAXTOT;

SET HAXIS=900
SET VAXIS=510
SET GRMERGE=ON
SET GRAPHEDIT = SERVER

GRAPH FILE GGSALES
SUM UNITS DOLLARS
BY REGION
ACROSS PRODUCT
WHERE RECORDLIMIT EQ 10
ON GRAPH SET GRAPHSTYLE *
setPlace(true);
setTextString (getTitle(),"BY REGION");
setY1TitleString("TEST");
setO1TitleString("TEST STRING");

setPlaceResize(getO1Label(),0);
setFontSizeAbsolute(getO1Label(),true);

setDataTextDisplay(true);
setFillMissingData(0);

setY1ScaleMaxAuto(false);
setScaleMax(getY1Axis(), &MAXTOT );
ENDSTYLE
END
-EXIT


WFConsultant

WF 8105M on Win7/Tomcat
 
Posts: 780 | Location: Florida | Registered: January 09, 2005Report This Post
Expert
posted Hide Post
.. and Kamesh demonstrates the excellent history of this forum and the myriad of suggestions contained there in.

Most solutions only require that you think laterally ....

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
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders