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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Line Graph
 Login/Join
 
Gold member
posted
Does anyone know if a line graph can be saved to an svg image after changing the solid line display to a dotted line display? This is sample code against the Car File. When you run the code below, it will display with solid lines. When you comment out the line that says "ON GRAPH HOLD AS CARGPH FORMAT SVG" the graph will display with dotted lines. Thanks.

GRAPH FILE CAR
SUM SALES RC DC
ACROSS CAR
ON GRAPH HOLD AS CARGPH FORMAT SVG
ON GRAPH SET LOOKGRAPH VLINE
ON GRAPH SET GRAPHSTYLE *
setDepthRadius(0);
setLineWidth(getSeries(0), 1);
setLineBasicStrokeType(getSeries(0), 5);
setLineWidth(getSeries(1), 1);
setLineBasicStrokeType(getSeries(1), 5);
setLineWidth(getSeries(2), 1);
setLineBasicStrokeType(getSeries(2), 5);
setMarkerDisplay(false);
setPlace(true);
ENDSTYLE
END
-RUN
TABLE FILE CAR
HEADING
"Car File Graph "
SUM CAR NOPRINT
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,
SQUEEZE=ON,
ORIENTATION=LANDSCAPE,
LEFTMARGIN=0.500000,
RIGHTMARGIN=0.500000,
TOPMARGIN=0.250000,
BOTTOMMARGIN=0.000000,
$
TYPE=REPORT,
GRID=OFF,
FONT='ARIAL',
SIZE=12,
COLOR='BLACK',
BACKCOLOR='NONE',
STYLE=NORMAL,
$
TYPE=HEADING,
BACKCOLOR='BLUE',
COLOR='WHITE',
$
TYPE=REPORT,
IMAGE=cargph.svg,
POSITION=(0.597222 1.241667),
SIZE=(8.375000 4.166667),
$
ENDSTYLE
END
-RUN


Michele Brooks
W.F.V. 7.1.7
Operating Sysetms Widows XP 5.1

This message has been edited. Last edited by: Kerry,
 
Posts: 70 | Registered: April 04, 2007Report This Post
Virtuoso
posted Hide Post
I tried this and also can not get SVG graph to show in a dotted line in the pdf. It does show in html.
But if you save it as a gif and include the gif in the pdf, then the dotted line is shown like in html.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Gold member
posted Hide Post
Can you send me your code? Thanks so much for taking the time. I really appreciate it.
 
Posts: 70 | Registered: April 04, 2007Report This Post
Expert
posted Hide Post
Michele,

Just change
ON GRAPH HOLD AS CARGPH FORMAT SVG
to
ON GRAPH HOLD AS CARGPH FORMAT GIF
and
IMAGE=cargph.svg
to
IMAGE=cargph.gif

This will embed a GIF image instead of the SVG image and you will get the dashed lines.
Unfortunately, GIF files are not as high-quality as SVG files.


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
Gold member
posted Hide Post
I must be missing a command because I got an error when I ran the code below. Thanks.

GRAPH FILE CAR
HEADING
"Car File Graph "
SUM SALES RC DC
ACROSS CAR
ON GRAPH HOLD AS CARGPH FORMAT GIF
ON GRAPH SET LOOKGRAPH VLINE
ON GRAPH SET GRAPHSTYLE *
setDepthRadius(0);
setLineWidth(getSeries(0), 1);
setLineBasicStrokeType(getSeries(0), 5);
setLineWidth(getSeries(1), 1);
setLineBasicStrokeType(getSeries(1), 5);
setLineWidth(getSeries(2), 1);
setLineBasicStrokeType(getSeries(2), 5);
setMarkerDisplay(false);
setPlace(true);
ENDSTYLE
END
ON GRAPH SET STYLE *
UNITS=IN,
SQUEEZE=ON,
ORIENTATION=LANDSCAPE,
LEFTMARGIN=0.500000,
RIGHTMARGIN=0.500000,
TOPMARGIN=0.250000,
BOTTOMMARGIN=0.000000,
$
TYPE=REPORT,
GRID=OFF,
FONT='ARIAL',
SIZE=12,
BACKCOLOR='NONE',
STYLE=NORMAL,
$
TYPE=HEADING,
BACKCOLOR='BLUE',
COLOR='WHITE',
$
TYPE=REPORT,
IMAGE=cargph.gif,
POSITION=(0.597222 1.241667),
SIZE=(8.375000 4.166667),
$
ENDSTYLE
END
-RUN
 
Posts: 70 | Registered: April 04, 2007Report This Post
Expert
posted Hide Post
The END after the first ENDSTYLE should not be there.


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
Gold member
posted Hide Post
I getting this error message

HTTP REQUEST FOR GRAPHSERVURL RETURNED ERROR:
 
Posts: 70 | Registered: April 04, 2007Report This Post
Expert
posted Hide Post
I'd be surprised if you are getting this for GIF files only. Just take the original code you posted and change SVG for GIF.


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
Gold member
posted Hide Post
I tried your suggestion but all I get is the heading. The graph image does not appear.
 
Posts: 70 | Registered: April 04, 2007Report This Post
<JG>
posted
Michele,

The code you have posted is totally incorect.

You have no TABLE request so the second part of the styling is not possible.

A graph cannot include its self into its self.

Look at the original code you posted and you will see your error
 
Report This Post
Virtuoso
posted Hide Post
As JG stated, go back to your original code, change the SVG for GIF and rerun the request.
If that is what you did which then resulted in the graphservurl error message, then add to your code (before the first graph):
SET GRAPHSERVURL=''
and then rerun it. This should resolve the problem.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Gold member
posted Hide Post
Pasted below is my revised code. When I run this code I just get the heading of the report, but no graph. Can a graph be inserted into a html report via the stylesheet, or does it have to been inserted another way?

SET GRAPHSERVURL=http://webfoct1/ibi_apps/IBIGraphServlet
APP HOLD ibisamp
FILEDEF CARGPH DISK /webfoc53/ibi/ibcapps/ibisamp/cargph.gif
-RUN
GRAPH FILE CAR
SUM SALES RC DC
ACROSS CAR
ON GRAPH HOLD AS CARGPH FORMAT GIF
ON GRAPH SET LOOKGRAPH VLINE
ON GRAPH SET GRAPHSTYLE *
setDepthRadius(0);
setLineWidth(getSeries(0), 1);
setLineBasicStrokeType(getSeries(0), 5);
setLineWidth(getSeries(1), 1);
setLineBasicStrokeType(getSeries(1), 5);
setLineWidth(getSeries(2), 1);
setLineBasicStrokeType(getSeries(2), 5);
setMarkerDisplay(false);
setPlace(true);
ENDSTYLE
END
TABLE FILE CAR
HEADING
"Car File Graph "
SUM CAR NOPRINT
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,
SQUEEZE=ON,
ORIENTATION=LANDSCAPE,
LEFTMARGIN=0.500000,
RIGHTMARGIN=0.500000,
TOPMARGIN=0.250000,
BOTTOMMARGIN=0.000000,
$
TYPE=REPORT,
GRID=OFF,
FONT='ARIAL',
SIZE=12,
COLOR='BLACK',
BACKCOLOR='NONE',
STYLE=NORMAL,
$
TYPE=HEADING,
BACKCOLOR='BLUE',
COLOR='WHITE',
$
TYPE=REPORT,
IMAGE=cargph.gif,
POSITION=(0.597222 1.241667),
SIZE=(8.375000 4.166667),
$
ENDSTYLE
END
-RUN
 
Posts: 70 | Registered: April 04, 2007Report This Post
Virtuoso
posted Hide Post
The technique of inserting an image in the heading of the report is for PDF only (ok, it could maybe also be used for Excel). For HTML it is sufficient to do a PCHOLD FORMAT GIF, and then folllow it up with the table request without the image in the heading. For HTML the heading technique will not work, as you noticed.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Expert
posted Hide Post
To help with getting graphs into the various formats used and to reiterate a point made many moons ago when this subject was raised (as it has sooooooooooooooooooo many times Wink)

For PDF - the file has to exist in your APP PATH (including the EDATEMP folder) for WF to be able to include it in the resultant PDF file. This is because the PDF file is compiled on the reporting server and is then sent to your browser as a complete stream.

For HTML - the file has to exist in a location accessible via a URL. This normally means that the file is held on the client server although it could be and web accessible location.

For Excel - the file must be available to the Excel application. This means that the file needs to be accessible via a network share or other local / network folder and referenced correctly internally to the Excel file.

Remember these three main points and direct your output accordingly and you shouldn't have too many problems - but then again I am sure some of you will Razzer

Of course, coding and / or style sheets will be different for each format as well.

T

This message has been edited. Last edited by: Tony A,



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, 2004Report This Post
Gold member
posted Hide Post
Thanks so much. I followed your suggestion and did get the graph to display in html format. I'm assuming that I can't save a graph in html format and then imbed the graph image into a report. Thanks again.
quote:
Originally posted by GamP:
The technique of inserting an image in the heading of the report is for PDF only (ok, it could maybe also be used for Excel). For HTML it is sufficient to do a PCHOLD FORMAT GIF, and then folllow it up with the table request without the image in the heading. For HTML the heading technique will not work, as you noticed.
 
Posts: 70 | Registered: April 04, 2007Report This Post
Gold member
posted Hide Post
Thanks Tony. I will save this information for future reference.
quote:
Originally posted by Tony A:
To help with getting graphs into the various formats used and to reiterate a point made many moons ago when this subject was raised (as it has sooooooooooooooooooo many times Wink)

For PDF - the file has to exist in your APP PATH (including the EDATEMP folder) for WF to be able to include it in the resultant PDF file. This is because the PDF file is compiled on the reporting server and is then sent to your browser as a complete stream.

For HTML - the file has to exist in a location accessible via a URL. This normally means that the file is held on the client server although it could be and web accessible location.

For Excel - the file must be available to the Excel application. This means that the file needs to be accessible via a network share or other local / network folder and referenced correctly internally to the Excel file.

Remember these three main points and direct your output accordingly and you shouldn't have too many problems - but then again I am sure some of you will Razzer

Of course, coding and / or style sheets will be different for each format as well.

T
 
Posts: 70 | Registered: April 04, 2007Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders