Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Graph - Bar size
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] Graph - Bar size
 Login/Join
 
<Antony Gubert>
posted
How to have fixed size of bars in graph?

Example: When the graph has 20 bars, the size (width) of each bar is different from when the graph has 3 bars. The bar size (width) changing according to the number of bars in the graph.

Is there any way to have the bar's size same irrespective of the number of bars in the graph?

Thanks

This message has been edited. Last edited by: FP Mod Chuck,
 
Reply With QuoteReport This Post
Platinum Member
posted Hide Post
i think so ,it's not possible.


Thanks,
Kalyan.S
------------------------------------
WebFOCUS 7.1.4, Win XP SP2,
Oracle8i.
------------------------------------
 
Posts: 155 | Location: Bangalore. | Registered: January 24, 2006Reply With QuoteReport This Post
Expert
posted Hide Post
Antony,

Download a copy of this manual WebFOCUS Graphics and keep it handy!

Search for setRiserWidth()

T

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



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.06 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5575 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
<Antony Gubert>
posted
Tony,

I already checked with "setRiserWidth()". It’s not making any change. It's keep changing according to the number of bars.

Thanks

Antony Gubert
 
Reply With QuoteReport This Post
Expert
posted Hide Post
It looks as though setRiserWidth() relates the percentage of the available space for the riser. So, if you really want to achieve this, you would have to resort to some calculation outside of your graph and maybe set the HAXIS and VAXIS according to the number of expected risers.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.06 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5575 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
<Antony Gubert>
posted
But doing that, the graph frame size won't be same across graphs. A report can have many graphs and the maximum number of bars in each graph can be up to 20. So dynamically i need to find the number of bars and for the remaining (20 - number of bars), i need to create dummy bars.

Yet to try....
 
Reply With QuoteReport This Post
Expert
posted Hide Post
Antony,

Use the COLUMNS syntax with blank values to do that. Something like -

-DEFAULT &Max_Cols = 20
-SET &ECHO=ALL;
TABLE FILE CAR
PRINT CAR
WHERE COUNTRY EQ 'ITALY' OR 'FRANCE' OR 'ENGLAND'
ON TABLE SAVE
END
-RUN
-SET &Count = &Max_Cols - &LINES;

-SET &Columns = 'COLUMNS ';
-READ SAVE, &Car
-REPEAT :Loop1 WHILE &IORETURN EQ 0;
-SET &Columns = IF &Columns NE 'COLUMNS ' THEN &Columns | ' AND ' ELSE &Columns ;
-SET &Columns = &Columns | '''&Car.EVAL''' ;
-READ SAVE, &Car
-:Loop1

-REPEAT :Loop2 &Count TIMES;
-SET &Columns = &Columns | ' AND ' | ''' ''' ;
-:Loop2

GRAPH FILE CAR
SUM RCOST
ACROSS CAR &Columns
ON GRAPH SET GRAPHSTYLE *
ENDSTYLE
END


This will always give the same number of risers as the value in &Max_Cols.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.06 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5575 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
<Antony Gubert>
posted
Hi Tony,
Your code is working fine. But when I apply the same code in my code, I am getting the following error message. Please have a look.

-***********
GRAPH FILE TEST
SUM TOT_AMT AS 'Amount'
ACROSS NAME AS '' COLUMNS 'Antony' AND 'Sachin' AND 'Shankar' AND 'Nitesh' AND ' ' AND ' ' AND ' ' AND ' ' AND ' ' AND ' ' AND ' ' AND ' ' AND ' ' AND ' ' AND ' ' AND ' ' AND ' ' AND ' ' AND ' ' AND ' '
ON GRAPH SET GRAPHSTYLE *
ENDSTYLE
END

0 NUMBER OF RECORDS IN GRAPH= 4 PLOT POINTS= 0
NO DATA TO GRAPH
-***********

Please let me know why I get this error.

Thanks

Antony Gubert
 
Reply With QuoteReport This Post
Master
posted Hide Post
Anyone ever figure this out?



 
Posts: 916 | Location: At the Mast | Registered: May 17, 2007Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Hi John,

Don't know which version you are using but look at page 149 (also available in other document version at different page): Adding Color-By and Size-By Fields. Maybe the solution is there.
Creating HTML5 Charts


WF versions : Prod 8.2.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2100 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
Expert
posted Hide Post
Hi John,

Try searching for "riser width" in the documentation.

Remember that for non HTML charting (JSCHART) you will need to concentrate on the Perspective for Java settings (normally start setO1Axis etc.)


T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.06 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5575 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Master
posted Hide Post
Thanks for the recommendations, but the "bucket" command just broke everything, and apparently doesn't work with VBAR. The jschart settings when copied whole-cloth stop the graph from printing without providing an error message.

This seems like a painfully simple, painfully obvious option that should just have a really really basic setting like "WIDTH=10" but apparently that's not the case.

My GRAPH TABLE command produces a separate graph for each month. Completed months are similar enough that it doesn't matter, the newest month, especially on the 1st day, look absurd. I'd just like them to show one bar the same width as the other graphs and then blank space to the right of that.

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



 
Posts: 916 | Location: At the Mast | Registered: May 17, 2007Reply With QuoteReport This Post
Expert
posted Hide Post
So your charts are for all days of a month? Why not just force the day numbers that you need? Any months that do not have 31 days, you could just add a dummy enforced column as per my reply to Antony.


T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.06 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5575 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Graph - Bar size

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.