Focal Point
[CLOSED] Controlling Riser Width and Align it to center

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/5227076296

February 21, 2020, 01:41 PM
rkiran1
[CLOSED] Controlling Riser Width and Align it to center
We are using xaxis: { groupFit: {rule: string', value: value } } to shrink the bar graph, but it aligns incorrectly to the left side.

How do we align the below graph to the center of the border.
GRAPH FILE GGSALES
SUM DOLLARS BUDDOLLARS UNITS BUDUNITS
BY PRODUCT
WHERE CATEGORY EQ 'Gifts'
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET STYLE *
-*TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $
TYPE=REPORT, JUSTIFY=CENTER,COLUMN=PRODUCT,GRID=ON, BORDER=HEAVY, $
TYPE=DATA,JUSTIFY=CENTER ,COLUMN=PRODUCT, $
TYPE=TITLE,JUSTIFY=CENTER, $
TYPE=HEADING, JUSTIFY=CENTER, FONT='ARIAL', SIZE=10, COLOR=RGB(100 100 100), STYLE=BOLD, $
TYPE=HEADING, LINE=1, ITEM=1, OBJECT=TEXT, FONT='Trebuchet MS', SIZE=12, COLOR=RGB(66 70 73), STYLE=BOLD, $
TYPE=FOOTING, JUSTIFY=CENTER,FONT='ARIAL', SIZE=9, STYLE=BOLD,  COLOR=RGB(100 100 100), $
*GRAPH_JS
xaxis:{ groupFit: {rule: 'exactSize', value: 100}}
*END
ENDSTYLE
END  


Alternatively, how do we align the entire graph under header

 GRAPH FILE GGSALES
SUM DOLLARS BUDDOLLARS UNITS BUDUNITS
BY PRODUCT
WHERE CATEGORY EQ 'Gifts'
HEADING 
"Title"
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET VZERO OFF
ON GRAPH SET HAXIS 400
ON GRAPH SET VAXIS 600
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET STYLE *
TYPE=REPORT, JUSTIFY=CENTER,COLUMN=PRODUCT,GRID=ON, BORDER=HEAVY, $
TYPE=DATA,JUSTIFY=CENTER ,COLUMN=PRODUCT, $
TYPE=TITLE,JUSTIFY=CENTER, $
TYPE=HEADING, JUSTIFY=CENTER, FONT='ARIAL', SIZE=10, COLOR=RGB(100 100 100), STYLE=BOLD, $
TYPE=HEADING, LINE=1, ITEM=1, OBJECT=TEXT, FONT='Trebuchet MS', SIZE=12, COLOR=RGB(66 70 73), STYLE=BOLD, $
TYPE=FOOTING, JUSTIFY=CENTER,FONT='ARIAL', SIZE=9, STYLE=BOLD,  COLOR=RGB(100 100 100), $
ENDSTYLE
END
 

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


Version 8.2.03
Output : HTML, Excel & PDF
February 24, 2020, 03:22 AM
Tony A
Would ON GRAPH SET EMBEDHEADING ON help you?

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 
February 24, 2020, 09:28 AM
rkiran1
Hi Tony,

EMBEDHEADING ON doesn't help me as it aligns the entire graph to left with the title. I would like the graph to align to the center or to a set position.
I am looking for a HTML function similar to leftgap for PDF output.

Regards,
KR


Version 8.2.03
Output : HTML, Excel & PDF
February 25, 2020, 03:44 AM
Tony A
Then there's plenty of examples on the forum using HTMTABLE output and positioning the output within your own DIV or IFRAME etc.

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 
February 25, 2020, 10:36 AM
Doug
My suggestion is to use Tnoy's suggestion or InfoAssist or even ReportPainter instead of using
*GRAPH_JS
xaxis:{ groupFit: {rule: 'exactSize', value: 100}}
*END
I just did what you asked... All In InfoAssist. You can put the result of the IA fex in an HTMLFORM, as Tony suggested.




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
February 26, 2020, 09:07 AM
rkiran1
Thank you Tony and Dong.

HTMLFORM approach was my last option. I was just wondering if there was a way around it, but looks like its the way to go.

I tried HTMLTABLE and found that the presentation is very different than JSCHART also i can't use JSchart scripts anymore. How do I retain the JSchart styling.


Regards,
KR

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


Version 8.2.03
Output : HTML, Excel & PDF