Focal Point
[CLOSED] Graph Legend Going Out Of Bounds

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/1337020776

June 30, 2015, 09:00 AM
iBeny
[CLOSED] Graph Legend Going Out Of Bounds
I have attached an Image, i have a Grid and Graph Report in PDF, The Graph hold file is stored in SVG Format.You can see in the image, the Legend Text is long and is going out of Border, i need to contain the same text within the border.
------Code Below------
GRAPH FILE OPENSR
SUM
0_10_DAYS AS ' 0-10 Working Days'
11_20_DAYS AS '11-20 Working Days'
21_30_DAYS AS '21-30 Working Days'
31_40_DAYS AS '31-40 Working Days'
GT_40_DAYS AS '>40 Working Days'
BY MONTH NOPRINT
BY MONTH_DESC AS 'Month'
&SHOWHTML ON GRAPH HOLD AS OPEN_SR_BAR FORMAT HTMTABLE
&HIDEHTML ON GRAPH HOLD AS OPEN_SR_BAR FORMAT SVG
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET VZERO OFF
ON GRAPH SET HAXIS 650
ON GRAPH SET VAXIS 360
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH VBRSTK1
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 2
ON GRAPH SET GRAPHSTYLE *
setTemplateFile("/images/tdg/template/IBISouthWestern.txt");
setReportParsingErrors(false);
setSelectionEnableMove(false);
setTransparentBorderColor(getSeries(0),true);
setTransparentBorderColor(getSeries(1),true);
setTransparentBorderColor(getSeries(2),true);
setTransparentBorderColor(getSeries(3),true);
setTransparentBorderColor(getSeries(4),true);
setTransparentBorderColor(getSeries(5),true);
setTransparentBorderColor(getSeries(6),true);
setTransparentBorderColor(getSeries(7),true);
setTransparentBorderColor(getSeries(8),true);
setTransparentBorderColor(getSeries(9),true);
setTransparentBorderColor(getSeries(10),true);
setTransparentBorderColor(getChartBackground(),true);
setBorderColor(getChartBackground(),new Color(192,192,192));
setPlace(true);
setLineWidthAllSeries(2);
setSeriesLineWidthDefault(2);
setBorderColor(getFrame(),new Color(192,192,192));
setShadowColor(getFrame(),new Color(192,192,192));
setBorderColor(getY1ZeroLine(),new Color(192,192,192));
setFillColor(getY1ZeroLine(),new Color(192,192,192));
setBorderColor(getY1AxisLine(),new Color(192,192,192));
setBorderColor(getO1AxisLine(),new Color(192,192,192));
setFillColor(getSeries(0),new Color(70,130,180));
setFillColor(getSeries(1),new Color(205,92,92));
setFillColor(getY1MajorGrid(),new Color(192,192,192));
setLineWidth(getY1MajorGrid(),0);
setDisplay(getReferenceLineY1(0),false);
setFillColor(getO1MajorGrid(),new Color(192,192,192));
setLineWidth(getO1MajorGrid(),1);
setGridStyle(getO1MajorGrid(),3);
setGridStyle(getY1MajorGrid(),0);
setBorderColor(getY1MajorGrid(),new Color(192,192,192));
setFontSizeAbsolute(getTitle(), true);
setFontSizeInPoints(getTitle(), 9);
setPlaceResize(getTitle(), 0);
setDepthRadius(5);
setDisplay(getLegendArea(),true);
setLegendPosition(2);
setFontName(getO1Label(),"San Serif");
setFontSizeAbsolute(getO1Label(), true);
setFontSizeInPoints(getO1Label(), 8);
setTextRotation(getO1Label(),1);
setFontName(getY1Label(),"Calibri");
setFontSizeInPoints(getY1Label(), 8);
setRiserWidth(5);
setFontName(getLegendText(),"Calibri");
setFontSizeAbsolute(getLegendText(), true);
setFontSizeInPoints(getLegendText(), 6);
setPlaceResize(getLegendText(), 0);
setFontName(getY1Label(),"Calibri");
setFontSizeAbsolute(getY1Label(), true);
setFontSizeInPoints(getY1Label(), 8);
setPlaceResize(getY1Label(), 0);
setLegendReverse(true);
setBorderColor(getNestedO1LabelLine(),new Color(255,255,255));
setDataTextPosition(4);
setFontSizeAbsolute(getDataText(0), true);
setFontSizeInPoints(getDataText(0), 7);
setPlaceResize(getDataText(0), 0);
setDataTextDisplay (true);
setStackedDataValueSum(false);


ENDSTYLE
END

This message has been edited. Last edited by: <Kathryn Henning>,


Webfocus 8105,8808,7703,7611, EXL2K,HTML,PDF,COMT,AHTML Info Assist+ , Reportcaster
June 30, 2015, 09:26 AM
iBeny



Webfocus 8105,8808,7703,7611, EXL2K,HTML,PDF,COMT,AHTML Info Assist+ , Reportcaster
June 30, 2015, 10:28 AM
Francis Mariani
Try adding this line, though I don't know if it will help...

setRect(getFrame(), new Rectangle(-16000,-16000,32000,32000)); // Set the graph display area to be the entire canvas.



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
June 30, 2015, 10:31 AM
CoolGuy
iBeny,

How on Earth did you get an image to post successfully on this forum? I have never been able to figure out how to do that! lol

In regards to your issue, add the following to your graph code:

ON GRAPH SET AUTOFIT ON

That will make sure everything fits within frame/window. Let me know if that helps. Good luck!


8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
June 30, 2015, 11:09 AM
Francis Mariani
AUTOFIT is a new option for 8.1.04. iBeny is on 7.6.11. Not everyone upgrades as soon as IBI wishes.

To add an image to a FocalPoint post, the image must be hosted somewhere on the web - in one of the cloud services like DropBox or in Flickr or image hosting sites like TinyPic. Then you add the image to the post using the [IMG] tag from the message buttons.


[IMG]https://c2.staticflickr.com/8/7764/17176604724_27b375d7fc_t.jpg[/IMG]


(Some of these sites are blocked by some companies, so even though you've successfully added an image, some FocalPointers may not see the image).


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
June 30, 2015, 11:17 AM
CoolGuy
Francis,

Thanks for the information on posting images on these forums. Also, I didn't think to look at iBeny's WF version. Sorry about that iBeny.


8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
July 01, 2015, 02:57 AM
iBeny
Now i am working on Webfocus 7701, the HTML page was working fine, but the we are using Landscape orientation for PDF, the width is limited to 11 inches.
Anyhow, do we have any other work around for the same to achieve?

For the image uploading part, i hosted it on tinypic and pasted the URL is the Image URL option on the Message Dialog box.


Webfocus 8105,8808,7703,7611, EXL2K,HTML,PDF,COMT,AHTML Info Assist+ , Reportcaster
July 01, 2015, 07:17 AM
Wep5622
Can't you set the legend title to 'Working days' and remove that text from the legend labels? ISTR that's possible...

I usually check available GRAPH options with this document: http://www.threedgraphics.com/.../doc/perspective.htm


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :