Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PORTABLE GRAPH FILES, GIF OUTPUT?

Status
Not open for further replies.

PeterG5

Programmer
Apr 29, 2003
68
IE
Hi,

I'm trying to generate graph files to deploy on our intranet
website but the graphs being outputted by Focus don't seem to be standalone, i.e they seem to need the Focus environment to be displayed. It seems they have some kind of Java code imbedded in them. Also, when I specify GIF output, I still get HTML, though it takes a lot longer to produce the file. Any thoughts?
Peter.
 
Can you provide samples of the code you're using, so we can see what it is you're trying? That may shed some light on what's happening.
 
Hello Focwizard,

Program:
GRAPH FILE JDE_SALE
SUM UNITS NETVAL
ACROSS WEEK
ON GRAPH SAVE AS TEST1 FORMAT GRAPH
END
-RUN
-EXIT

Resulting HTM file (Notepad display):
<HTML>
<BASE HREF=file://C:\IBI\desktop43\home\bin\ >
<HEAD>
<TITLE>FOCUS Graph</TITLE>
</HEAD>
<BODY BGCOLOR=&quot;ffffff&quot;>
<APPLET name=graph codebase=ibi_html/javaassist archive=IBITDGChartApplet.jar code=IBITDGChartApplet.class width=760 height=400>
<PARAM name=LicenseURL value=&quot;FOCUS:&quot;>
<PARAM name=TDGSCRIPT value = '
setGraphType(61);
setSeriesLabelArray(&quot;UNITS&quot;, &quot;NETVAL&quot;);
setDataSeries(
25, 3395400.00,
26, 11301751.00,
27, 10362066.00,
28, 8823308.00,
29, 8012349.00,
30, 7310568.00);
setDataSeries(
25, 3058478.50,
26, 7346135.00,
27, 7123143.50,
28, 4814454.00,
29, 4453749.00,
30, 2756502.25);
setDataRangeToExtent();
setConnectScatterMarkers(true);
setY1MajorGridStyle(3);
setX1MajorGridStyle(3);
setY1MustIncludeZero(true);
setX1MustIncludeZero(true);
setDataTextPosition(0);
setDataTextRadiusDefault(10);
setX1LabelFormat(-1);
setX1LabelFormatPattern(&quot;0.00&quot;);
setDataTextFormat(-1);
setDataTextFormatPattern(&quot;0.00&quot;);
setX1TitleString(&quot;WEEK&quot;);
setTextRotation(getO1Label(),2);
setTextRotation(getO2Label(),2);
setTextRotation(getX1Label(),2);
setTextRotation(getX2Label(),2);
setFontSizeVC(getDataText(),1000);
setFontSizeVC(getFootnote(),1000);
setFontSizeVC(getLegendText(),1000);
setFontSizeVC(getO1Label(),1000);
setFontSizeVC(getO1Title(),1000);
setFontSizeVC(getO2Label(),1000);
setFontSizeVC(getO2Title(),1000);
setFontSizeVC(getPieLabel(),1000);
setFontSizeVC(getPieRingLabel(),1000);
setFontSizeVC(getPieSliceLabel(),1000);
setFontSizeVC(getSubtitle(),1000);
setFontSizeVC(getTitle(),1000);
setFontSizeVC(getX1Label(),1000);
setFontSizeVC(getX1Title(),1000);
setFontSizeVC(getY1Axis(),1000);
setFontSizeVC(getY1Label(),1000);
setFontSizeVC(getY1Title(),1000);
setFontSizeVC(getY2Label(),1000);
setFontSizeVC(getY2Title(),1000);
setToolTipDisplay(true);
'>
</APPLET>
<BR>
</BODY>
</HTML>
The data appears to be imbedded in the graph and I'm not sure of the implications of the references to IBIxxx.JAR files or Javaassist; My assumption is that the end user has to have access to IBI files in order to see the graphs, i.e. he/she had to have a version of Focus on local PC as a viewing pre-requisite. I'm also intrigued by the GIF/HTML issue. As I said, the HTML output is generated really quickly while the &quot;ON GRAPH HOLD AS XXXX FORMAT GIF&quot; takes considerably longer but they both produce identical output files..... in HTML format. Thanks for any help.
Peter.
 
Peter,

'ON TABLE SAVE ... FORMAT GRAPH' is not a supported FORMAT. It DEFAULTS to HTML, which is why you get HTML output.

When you use 'FORMAT GIF', it ALSO produces HTML output, but THEN a Java application massages that output, and produces an ADDITIONAL output, in 'standalone' GIF format. That's why it takes longer. The GIF file can be redirected via a FILEDEF.
 
Hello again,

I ran it again, saving the file as 'GIF' format.
I can't find the additional output (gif file) anywhere on the C:\ drive and I'm not sure what &quot;re-directing the GIF via a FILEDEF&quot; means. How do I do this? Focus issues default filedefs for output files and in this case, it's still pointing at a HTML file.....
TEST1 DISK 512 V N Y C:\IBI\PGFTEMP\test1.htm

Peter.
 
Peter,

There are TWO issues:

1. I'm guessing you're running Desktop, rather than WebFocus (based on the HTML produced). In either case, to produce GIF output, you need to have the envorinment variable JAVAPATH set. In WebFocus it's set in EDASTART.BAT; in Desktop, it's set in FOCSHELL.INI. It looks something like this:

SET IBIJAVAPATH=c:\j2sdk1.4.1_03\bin\java -classpath c:\j2sdk1.4.1_03\src.zip;c:\ibi\WebFOCUS52\ibi_html\javaassist\IBIGifGraphChart.jar

2. To redirect the output, you MANUALLY specify the FILEDEF, like this:

FILEDEF output DISK location

and your request says:

ON GRAPH HOLD AS output FORMAT GIF
 
Sorry, that should read:

&quot;...you need to have the envorinment variable IBIJAVAPATH set...&quot;
 
I can't code the SET statement as you've shown above as I obviously have a very different directory structure.
For example, I dont have anything like &quot;c:\j2sdk1.4.1_03\bin\java&quot;. Mine was a standard installation of WebFocus 431, using all default folder names.
My nearest equivalent is:
JAVAPATH=c:\ibi\desktop43\HOME\bin\ -classpath c:\ibi\desktop43\home\bin\ibi_html\javaassist\IBIGifGraphChart.jar
though I'm not sure is this is correct. I've also tried SET JAVAPATH, SET IBIJAVAPATH, though I don't know what effect these lines are having as there is no indication at startup of the results of these statements, if any.
I've put this as line 11 of the FOCSHELL.INI file and run this:
FILEDEF TEST1 DISK C:\IBI\PGFTEMP\TEST1.GIF
-RUN
GRAPH FILE JDE_SALE
SUM UNITS NETVAL
ACROSS WEEK
ON GRAPH HOLD AS TEST1 FORMAT GIF
END
-RUN
-EXIT
It now runs as before, says &quot;GIF file saved&quot; but I still have a HTML file. Is my syntax correct? Is it time to give up?
 
Peter,

If this is still an issue, send me your e-mail address (to FOCWIZARD@IBI.COM) and I'll send you a pre-release document on producing graphs with WebFocus, which may explain more than I could here.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top