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.
Below is sample code with CAR file. I am stuck at heading. I want the red backcolor of heading stretch from one end to other of the graph rather than just being behind the heading text. Is there a way to do it? Please suggest.
ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
SET HTMLENCODE=ON
SET ARGRAPHENGINE=JSCHART
SET EMBEDHEADING=ON
SET GRAPHDEFAULT=OFF
GRAPH FILE car
-* Created by Info Assist for Graph
SUM CAR.BODY.DEALER_COST
CAR.BODY.RETAIL_COST
BY CAR.ORIGIN.COUNTRY
HEADING
"Cost by Country"
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET AUTOFIT OFF
ON GRAPH SET GRWIDTH 1
ON GRAPH SET UNITS PIXELS
ON GRAPH SET HAXIS 700
ON GRAPH SET VAXIS 400
ON GRAPH SET LOOKGRAPH LINE
ON GRAPH SET STYLE *
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
TYPE=REPORT, PAGESIZE=LEGAL, $
TYPE=DATA, COLUMN=N1, BUCKET=x-axis, $
TYPE=DATA, COLUMN=N2, BUCKET=y-axis, $
TYPE=DATA, COLUMN=N3, BUCKET=y-axis, $
TYPE=HEADING, JUSTIFY=CENTER, $
TYPE=HEADING, LINE=1, BACKCOLOR=RGB(255 0 0), $
TYPE=HEADING, LINE=1, ITEM=1, OBJECT=TEXT, FONT='COURIER', SIZE=12, COLOR=WHITE, STYLE=BOLD+ITALIC, $
ENDSTYLE
END
Thank you.This message has been edited. Last edited by: WebFOCUS_Dev,
ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
SET HTMLENCODE=ON
SET ARGRAPHENGINE=JSCHART
SET EMBEDHEADING=ON
SET GRAPHDEFAULT=OFF
GRAPH FILE car
-* Created by Info Assist for Graph
SUM CAR.BODY.DEALER_COST
CAR.BODY.RETAIL_COST
BY CAR.ORIGIN.COUNTRY
-*HEADING
-*"Cost by Country"
-*ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH HOLD AS MYCHART FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET AUTOFIT OFF
ON GRAPH SET GRWIDTH 1
ON GRAPH SET UNITS PIXELS
ON GRAPH SET HAXIS 700
ON GRAPH SET VAXIS 400
ON GRAPH SET LOOKGRAPH LINE
ON GRAPH SET STYLE *
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
TYPE=REPORT, PAGESIZE=LEGAL, $
TYPE=DATA, COLUMN=N1, BUCKET=x-axis, $
TYPE=DATA, COLUMN=N2, BUCKET=y-axis, $
TYPE=DATA, COLUMN=N3, BUCKET=y-axis, $
TYPE=HEADING, JUSTIFY=CENTER, $
TYPE=HEADING, LINE=1, BACKCOLOR=RGB(255 0 0), $
TYPE=HEADING, LINE=1, ITEM=1, OBJECT=TEXT, FONT='COURIER', SIZE=12, COLOR=WHITE, STYLE=BOLD+ITALIC, $
ENDSTYLE
END
-RUN
-HTMLFORM BEGIN
<TABLE>
<TR><TD bgcolor=red align=center><b>Cost by Country</b></TD></TR>
<TR><TD>!IBI.FIL.MYCHART;</TD></TR>
</TABLE>
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, 2005
ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
SET HTMLENCODE=ON
SET ARGRAPHENGINE=JSCHART
SET EMBEDHEADING=ON
SET GRAPHDEFAULT=OFF
GRAPH FILE car
-* Created by Info Assist for Graph
SUM CAR.BODY.DEALER_COST
CAR.BODY.RETAIL_COST
BY CAR.ORIGIN.COUNTRY
-*HEADING
-*"Cost by Country"
-*ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH HOLD AS MYCHART FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET AUTOFIT OFF
ON GRAPH SET GRWIDTH 1
ON GRAPH SET UNITS PIXELS
ON GRAPH SET HAXIS 700
ON GRAPH SET VAXIS 400
ON GRAPH SET LOOKGRAPH LINE
ON GRAPH SET STYLE *
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
TYPE=REPORT, PAGESIZE=LEGAL, $
TYPE=DATA, COLUMN=N1, BUCKET=x-axis, $
TYPE=DATA, COLUMN=N2, BUCKET=y-axis, $
TYPE=DATA, COLUMN=N3, BUCKET=y-axis, $
TYPE=HEADING, JUSTIFY=CENTER, $
TYPE=HEADING, LINE=1, BACKCOLOR=RGB(255 0 0), $
TYPE=HEADING, LINE=1, ITEM=1, OBJECT=TEXT, FONT='COURIER', SIZE=12, COLOR=WHITE, STYLE=BOLD+ITALIC, $
ENDSTYLE
END
-RUN
-HTMLFORM BEGIN
<TABLE>
<TR><TD bgcolor=red align=center>[b]Cost by Country[/b]</TD></TR>
<TR><TD>!IBI.FIL.MYCHART;</TD></TR>
</TABLE>
Thanks Doug. I customized this for my code and it works fine. I am having one issue which I am not able to fix. If I run the code without HTMLFORM like in my 1st post, graph fits in the iframe with no scrolls. But when I use HTML form, scrolls are coming up. I tried giving width to TABLE and TD but it did not fix. Any suggestion would help. Thank you.
I think you are in between a rock and a hard place. Before you switched to using html you probably had the option to embed the header in the chart which prevents the scrolling now you have overridden that with the html. Not sure how to solve the scrolling.
Thank you for using Focal Point!
Chuck Wolff - Focal Point Moderator WebFOCUS 7x and 8x, Windows, Linux All output Formats
Posts: 2127 | Location: Customer Support | Registered: April 12, 2005
Solve the scrolling by using "overflow: none; within some CSS - either in an -HTMLFORM BEGIN / END or external CSS file.
If you are going toplay around with HTML then I would urge you to learn the basics and extend your knowledge by learning CSS (CSS3 ideally) and JavaScript.
By JavaScript, I mean the basics first then followed by jQuery and maybe D3.
With this knowledge you will be able to achieve so much more as well as understanding the syntax and structure of the JSCHART engine.
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, 2004
Originally posted by Tony A: The way I would go forward is to use AUTOFIT=ON and the following CSS -
-HTMLFORM BEGIN
<style>
.title {
background-color: red;
width: 100%;
text-align: center;
left: 0px !important;
}
<style>
-HTMLFORM END
T
Tony, I have below code. And in HTML, I cjhanged overflow to hidden. Scrollbars are gone but bottom part of the graph is getting trimmed off and not displayed. Can you please suggest what am I doing wrong?
ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
SET HTMLENCODE=ON
SET ARGRAPHENGINE=JSCHART
SET EMBEDHEADING=ON
SET GRAPHDEFAULT=OFF
GRAPH FILE car
-* Created by Info Assist for Graph
SUM CAR.BODY.DEALER_COST
CAR.BODY.RETAIL_COST
BY CAR.ORIGIN.COUNTRY
ON GRAPH HOLD AS MYCHART FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET AUTOFIT ON
ON GRAPH SET GRWIDTH 1
ON GRAPH SET UNITS PIXELS
ON GRAPH SET HAXIS 650
ON GRAPH SET VAXIS 350
ON GRAPH SET LOOKGRAPH LINE
ON GRAPH SET STYLE *
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
TYPE=REPORT, PAGESIZE=LEGAL, $
TYPE=DATA, COLUMN=N1, BUCKET=x-axis, $
TYPE=DATA, COLUMN=N2, BUCKET=y-axis, $
TYPE=DATA, COLUMN=N3, BUCKET=y-axis, $
ENDSTYLE
END
-RUN
-HTMLFORM BEGIN
<html>
<style>
.title {
background-color: #004e87;
color: white;
width: 100%;
text-align: center;
left: 0px;
}
</style>
<body>
<TABLE>
<TR><TD class="title"><b>GRAPH TITLE</b></TD></TR>
<TR><TD>!IBI.FIL.MYCHART;</TD></TR>
</TABLE>
</body>
</html>
-HTMLFORM END
Instead of using a table, try using a div for each element and then give the title div a position of fixed with a top of 0
ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
SET HTMLENCODE=ON
SET ARGRAPHENGINE=JSCHART
SET EMBEDHEADING=ON
SET GRAPHDEFAULT=OFF
GRAPH FILE car
-* Created by Info Assist for Graph
SUM CAR.BODY.DEALER_COST
CAR.BODY.RETAIL_COST
BY CAR.ORIGIN.COUNTRY
ON GRAPH HOLD AS MYCHART FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET AUTOFIT ON
ON GRAPH SET GRWIDTH 1
ON GRAPH SET UNITS PIXELS
ON GRAPH SET HAXIS 650
ON GRAPH SET VAXIS 350
ON GRAPH SET LOOKGRAPH LINE
ON GRAPH SET STYLE *
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
TYPE=REPORT, PAGESIZE=LEGAL, $
TYPE=DATA, COLUMN=N1, BUCKET=x-axis, $
TYPE=DATA, COLUMN=N2, BUCKET=y-axis, $
TYPE=DATA, COLUMN=N3, BUCKET=y-axis, $
ENDSTYLE
END
-RUN
-HTMLFORM BEGIN
<html>
<head>
<style>
.title {
background-color: #004e87;
color: white;
width: 100%;
text-align: center;
left: 0px;
position: fixed;
top:0;
}
</style>
</head>
<body>
<div class="title"><b>GRAPH TITLE</b></div>
<div id="chart1">!IBI.FIL.MYCHART;</div>
</body>
</html>
-HTMLFORM END
Hallway
Prod: 8202M1
Test: 8202M4
Repository:
OS:
Outputs:
Posts: 608 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015
I tried this code. Top of the graph is getting trimmed. For example, Y-axis scale is from 0 to 70K. 70K is cutting off.
quote:
Originally posted by Hallway: Instead of using a table, try using a div for each element and then give the title div a position of fixed with a top of 0
ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
SET HTMLENCODE=ON
SET ARGRAPHENGINE=JSCHART
SET EMBEDHEADING=ON
SET GRAPHDEFAULT=OFF
GRAPH FILE car
-* Created by Info Assist for Graph
SUM CAR.BODY.DEALER_COST
CAR.BODY.RETAIL_COST
BY CAR.ORIGIN.COUNTRY
ON GRAPH HOLD AS MYCHART FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET AUTOFIT ON
ON GRAPH SET GRWIDTH 1
ON GRAPH SET UNITS PIXELS
ON GRAPH SET HAXIS 650
ON GRAPH SET VAXIS 350
ON GRAPH SET LOOKGRAPH LINE
ON GRAPH SET STYLE *
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
TYPE=REPORT, PAGESIZE=LEGAL, $
TYPE=DATA, COLUMN=N1, BUCKET=x-axis, $
TYPE=DATA, COLUMN=N2, BUCKET=y-axis, $
TYPE=DATA, COLUMN=N3, BUCKET=y-axis, $
ENDSTYLE
END
-RUN
-HTMLFORM BEGIN
<html>
<head>
<style>
.title {
background-color: #004e87;
color: white;
width: 100%;
text-align: center;
left: 0px;
position: fixed;
top:0;
}
</style>
</head>
<body>
<div class="title">[b]GRAPH TITLE[/b]</div>
<div id="chart1">!IBI.FIL.MYCHART;</div>
</body>
</html>
-HTMLFORM END
Originally posted by Hallway: Interesting. What browser are you using? I tried in IE11, Chrome, Edge, and FF and I can see the top of the scale in every browser.
I am using IE 11. Did you make changes to iframe properties in HTML Composer?
I aplogize. In my haste, I missed in the post that this was in an iframe using the html canvas. Try changing yout HTML FORM to include a height in the title div and add in a margin-top to the body that is equal to the title div height. Make sure that you have the !important on the margin-top of the body, otherwise the html canvas will override it.
Awesome. This fixed my issue. I will test more. Thank you so much.
quote:
Originally posted by Hallway: I aplogize. In my haste, I missed in the post that this was in an iframe using the html canvas. Try changing yout HTML FORM to include a height in the title div and add in a margin-top to the body that is equal to the title div height. Make sure that you have the !important on the margin-top of the body, otherwise the html canvas will override it.
You can play around with the css of the title. Below I made it bigger with a different font and fallback fonts, enabled flexbox to center the text vertically and horizontally and removed the <b> html tags (which are deprecated in html5) and put in in the css which gives you a lot more flexibility. See: https://developer.mozilla.org/.../Web/CSS/font-weight .