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]Graph not properly sizing when included in HTML page

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]Graph not properly sizing when included in HTML page
 Login/Join
 
Virtuoso
posted
Hi,

I have a strange issue and can't figure what is going wrong.
I'm using 8201M

I have the following graph that render perfectly when ran by itself.
I have 3 graph per row and 4 rows. The whole thing is taking about 10 inches width per 6 1/2 inches height.
ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
SET HTMLENCODE=ON
SET ARGRAPHENGINE=JSCHART
SET EMBEDHEADING=ON
SET GRAPHDEFAULT=OFF
-DEFAULTH &WF_STYLE_UNITS='PIXELS';

-* Requested graph size
-DEFAULTH &WF_STYLE_HEIGHT='150.0';
-DEFAULTH &WF_STYLE_WIDTH='320.0';

-* Graph displayed as if the size is like below once added in an HTML page
-*-DEFAULTH &WF_STYLE_HEIGHT='650.0';
-*-DEFAULTH &WF_STYLE_WIDTH='1020.0';

-DEFAULTH &WF_TITLE='WebFOCUS Report';

DEFINE FILE GGSALES
 SALES_YY/YY=DATE ;
 SALES_MM/MONTH=DATE ;
END
GRAPH FILE GGSALES
SUM GGSALES.SALES01.DOLLARS AS ''
BY GGSALES.SALES01.CITY NOPRINT
BY SALES_YY AS ''
BY SALES_MM AS ''

HEADING
"<GGSALES.SALES01.CITY<+0> "
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET AUTOFIT ON
ON GRAPH SET GRWIDTH 3
ON GRAPH SET UNITS &WF_STYLE_UNITS
ON GRAPH SET HAXIS &WF_STYLE_WIDTH
ON GRAPH SET VAXIS &WF_STYLE_HEIGHT
ON GRAPH SET LOOKGRAPH LINE
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setDepthRadius(0);
setUseSeriesShapes(true);
setPlace(true);
setPieDepth(0);
setPieTilt(0);
setCurveFitEquationDisplay(false);
*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, ORIENTATION=LANDSCAPE, $
TYPE=DATA, COLUMN=N1, BUCKET=page, $
TYPE=DATA, COLUMN=N2, BUCKET=color, $
TYPE=DATA, COLUMN=N3, BUCKET=x-axis, $
TYPE=DATA, COLUMN=N4, BUCKET=y-axis, $
TYPE=HEADING, JUSTIFY=CENTER, $
TYPE=HEADING, LINE=1, ITEM=1, OBJECT=FIELD, FONT='ARIAL', SIZE=10, COLOR=RGB(32 0 32), STYLE=NORMAL, $
TYPE=HEADING, LINE=1, ITEM=1, OBJECT=TEXT, FONT='ARIAL', SIZE=10, COLOR=RGB(32 0 32), STYLE=NORMAL, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
setScaleMustIncludeZero(getY1Axis(),false);
setDisplay(getY1Label(),false);
setMarkerShape(getAllSeries(),2);
setDisplay(getY1AxisLine(),false);
setDisplay(getY1MajorTick(),false);
setDisplay(getLegendArea(),false);
setTextRotation(getO1Label(),3);
*GRAPH_JS_FINAL
"pieProperties": {
    "holeSize": "0%"
},
"blaProperties": {
    "seriesLayout": "absolute"
},
"agnosticSettings": {
    "chartTypeFullName": "Line_Absolute"
}
*END
ENDSTYLE
END
-RUN

When I include the graph in an HTML page (either from a report or in an iFrame) and have the control sized approximately to 10 per 7 inches I assume that all my graph will fit in that control area.
But the issue is that all the graph are displayed as if the graph properties was set as below and the control is size is increased to have them all displayed on execution (meaning about 30 inches per 28 inches).
-DEFAULTH &WF_STYLE_HEIGHT='650.0';
-DEFAULTH &WF_STYLE_WIDTH='1020.0';

Note that I have "Sizing and Scrolling" set to No.

I hope that I'm clear since posting images may not be an option...

What am I missing ?

Thanks

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


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
Virtuoso
posted Hide Post
Here is the solution received from IB Support.

quote:

When using a set of graphs that you want to appear at a certain size like this, it's typically best to hard-code the HAXIS and VAXIS values.
The HTML appears to be passing its own height/width values to the chart, rather than using the defaults set in your procedure.


Replace
ON GRAPH SET HAXIS &WF_STYLE_WIDTH
ON GRAPH SET VAXIS &WF_STYLE_HEIGHT

By
ON GRAPH SET HAXIS 320
ON GRAPH SET VAXIS 150


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]Graph not properly sizing when included in HTML page

Copyright © 1996-2020 Information Builders