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] Changing the pattern of Stacked Bar Graph

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Changing the pattern of Stacked Bar Graph
 Login/Join
 
Member
posted
Hi,

I currently have some code which produces a stacked bar graph, which is displayed using "true colours", however i wish to change the display so that the colours also have differing patterns, is this possible?

I have tried looking through the GUI in the Graph assistant and had no success.

Any suggestions would be helpful since i am drawing a complete blank.

cheers

Stu.

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


WebFocus 7.6.5
Windows
HTML (some Excel and PDF)
 
Posts: 8 | Registered: September 03, 2009Report This Post
<JG>
posted
 
Report This Post
Virtuoso
posted Hide Post
You can download and look through the WF graph manual. You will find all kinds of commands to change the color and add gradient or texture.


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Member
posted Hide Post
JG - does that example work for any sort of graph type?
Also will the path for the images used in the background need to be in the following path
/approot/"a folder"/sample.gif??

thanks,

Stu.


WebFocus 7.6.5
Windows
HTML (some Excel and PDF)
 
Posts: 8 | Registered: September 03, 2009Report This Post
Expert
posted Hide Post
The document JG refers to states
quote:
The only way it works (and this is the possible second bug and/or document omission) is for the file to exist in the javaassist directory of WebFOCUS or a subdirectory of javaassist. So as I use a subdirectory to javaassist called /images/custom the API call then becomes setTextureURL(object id,"/images/custom/ file");


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
<JG>
posted
Stuart,

Any type of graph can take images.

As Francis points out the location of the images had to be under \ibi\WebFOCUS76\ibi_html\javaassist\images\custom
Where custom is any folder that you want. That was based on 7.1.x.

However under 7.6.9 (and probably most of the 7.6 releases) you should use \ibi\WebFOCUS76\ibi_html\javaassist\images
 
Report This Post
Member
posted Hide Post
Thanks to all for the replies. I setup a folder in that path, and created some JPG files to use and put them in that path, but i still cannot get the job to run.

The code i have used so far is as follows, any ideas where i am going wrong?

GRAPH FILE HIST_LATE_RELEASE_DETAIL
SUM RLSE_LATE AS 'Late Tonnes'
ACROSS YYW_WEEK AS 'Week'
BY MD_PROD AS 'Prod'
WHERE ( YYW_WEEK GE '&START_WEEK' ) AND ( YYW_WEEK LE '&LASTWEEK' );
ON GRAPH SET LOOKGRAPH VBRSTK1
ON GRAPH SET GRAPHEDIT SERVER
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF
ON GRAPH SET VZERO ON
ON GRAPH SET GRID ON
ON GRAPH SET VAXIS 500
ON GRAPH SET HAXIS 900
ON GRAPH SET GRMERGE ON
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET GRAPHSTYLE *
setFrameDisplay(false);
setRiserWidth(55);
setDataTextDisplay(true);
-*
-* Create the annotation box and
-*
setDisplay(getAnnotationBox(0), true);
setDisplay(getAnnotation(0), true);
setFontSize(getAnnotation(0),6);
setFontStyle(getAnnotation(0), 0);
setTextString(getAnnotation(0), " ");
setTransparentBorderColor(getAnnotationBox(0), false);
setRect(getAnnotation(0), new Rectangle (9000, 5000, 4800,10000));
-*
-* Set the fill type for objects that you want to contain images to texture
-*
setFillType(getSeries(0),3);
setFillType(getSeries(1),3);
setFillType(getSeries(2),3);
setFillType(getSeries(3),3);
setFillType(getSeries(4),3);
setFillType(getAnnotationBox(0),3);
setFillType(getChartBackground(),3);
-*
-* Set the display mode of you objects to either stretched or tiled
-*
setTextureDisplayMode(getSeries(0),0);
setTextureDisplayMode(getSeries(1),1);
setTextureDisplayMode(getSeries(2),1);
setTextureDisplayMode(getSeries(3),1);
setTextureDisplayMode(getSeries(4),0);

-*
-* Assign your images (textures) to the objects
-*
setTextureURL(getAnnotationBox(0),"/images/stuart/checkered.jpg");
setTextureURL(getChartBackground(),"/images/stuart/checkered.jpg");
setTextureURL(getSeries(0),"/images/stuart/vertical.jpg");
setTextureURL(getSeries(1),"/images/stuart/horizontal.jpg");
setTextureURL(getSeries(2),"/images/stuart/diaganol.jpg");
setTextureURL(getSeries(3),"/images/stuart/checkered.jpg");

setPlace(false);
ENDSTYLE
ON GRAPH SET STYLE *
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
TITLETEXT='Late Order Release High Level Product Performance',
$
TYPE=REPORT,
GRID=OFF,
FONT='TIMES NEW ROMAN',
SIZE=10,
JUSTIFY=CENTER,
$
ENDSTYLE
END


WebFocus 7.6.5
Windows
HTML (some Excel and PDF)
 
Posts: 8 | Registered: September 03, 2009Report This Post
<JG>
posted
quote:
/images/stuart/

Stuart as you're 7.6.5 try putting the images in /images/

Are you getting any errors returned?
 
Report This Post
Member
posted Hide Post
I have moved the files to that location and there is no change. There are no errors, the html is populated with the graph as a stacked bar graph, but the pictures are not pulled in. The only thing apparent is a white box in the top right hand corner.

Any other ideas?

Thanks,

Stu.


WebFocus 7.6.5
Windows
HTML (some Excel and PDF)
 
Posts: 8 | Registered: September 03, 2009Report This Post
<JG>
posted
The white box is the annotation.

I've tested the code (just changed it to use the car file and standard tdg images)
in both 7.6.6 and 7.6.9 and it works fine using both /images and /images/stuart

The only suspicion is that the location of the images is not correct

assuming that you have a bog standard install on the c drive the path should be

c:\ibi\WebFOCUS76\ibi_html\javaassist\images

You can see if the following runs if so that is the issue

 

GRAPH FILE CAR
SUM DEALER_COST
ACROSS COUNTRY
ON GRAPH SET LOOKGRAPH VBRSTK1
ON GRAPH SET GRAPHEDIT SERVER
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF
ON GRAPH SET VZERO ON
ON GRAPH SET GRID ON
ON GRAPH SET VAXIS 500
ON GRAPH SET HAXIS 900
ON GRAPH SET GRMERGE ON
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET GRAPHSTYLE *
setFrameDisplay(false);
setRiserWidth(55);
setDataTextDisplay(true);
-*
-* Create the annotation box and
-*
setDisplay(getAnnotationBox(0), true);
setDisplay(getAnnotation(0), true);
setFontSize(getAnnotation(0),6);
setFontStyle(getAnnotation(0), 0);
setTextString(getAnnotation(0), " ");
setTransparentBorderColor(getAnnotationBox(0), false);
setRect(getAnnotation(0), new Rectangle (9000, 5000, 4800,10000));
-*
-* Set the fill type for objects that you want to contain images to texture
-*
setFillType(getSeries(0),3);
setFillType(getSeries(1),3);
setFillType(getSeries(2),3);
setFillType(getSeries(3),3);
setFillType(getSeries(4),3);
setFillType(getAnnotationBox(0),3);
setFillType(getChartBackground(),3);
-*
-* Set the display mode of you objects to either stretched or tiled
-*
setTextureDisplayMode(getSeries(0),0);
setTextureDisplayMode(getSeries(1),1);
setTextureDisplayMode(getSeries(2),1);
setTextureDisplayMode(getSeries(3),1);
setTextureDisplayMode(getSeries(4),0);

-*
-* Assign your images (textures) to the objects
-*
setTextureURL(getAnnotationBox(0),"/images/tdg/ColorTool.gif");
setTextureURL(getChartBackground(),"/images/tdg/Carrera_White.gif");
setTextureURL(getSeries(0),"/images/tdg/blue_tile.gif");
setTextureURL(getSeries(1),"/images/tdg/bricks.gif");
setTextureURL(getSeries(2),"/images/tdg/Azul_Granite.gif");
setTextureURL(getSeries(3),"/images/tdg/Icons.gif");

setPlace(false);
ENDSTYLE
ON GRAPH SET STYLE *
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
TITLETEXT='Late Order Release High Level Product Performance',
$
TYPE=REPORT,
GRID=OFF,
FONT='TIMES NEW ROMAN',
SIZE=10,
JUSTIFY=CENTER,
$
ENDSTYLE
END
 
 
Report This Post
Expert
posted Hide Post
I attempt to never add custom anything to any of the IBI-supplied directories as that tends to complicate upgrades. I have a functioning focexec that adds a texture to a bar graph using an image in approot:
setTextureURL(getSeries(0),"http://my_web_server/approot/ibidemo/bg2.jpg");


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
<JG>
posted
Ginny

That is always my preference as well, but there was a bug in 5.x.x and 7.1.x versions
which meant it would not work.

And I hate having to code absolute urls
 
Report This Post
Expert
posted Hide Post
quote:
And I hate having to code absolute urls

I agree. I don't think I could get it to work without but then I did it in a hurry awhile back for one of my users.

As for the bug, good to know.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Member
posted Hide Post
Thanks both,

it was just the case that i had wrong file path.

All working now.

Thanks very much, very helpful.

regards,
Stu.


WebFocus 7.6.5
Windows
HTML (some Excel and PDF)
 
Posts: 8 | Registered: September 03, 2009Report 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] Changing the pattern of Stacked Bar Graph

Copyright © 1996-2020 Information Builders