Focal Point
[CLOSED] X-Axis Labels Wrapping does not working

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

January 05, 2017, 07:33 AM
Amom
[CLOSED] X-Axis Labels Wrapping does not working
Dear all,

I need to set text wrapping for the labels of X-Axis.
I tried use the setTextWrap () to X1Label and O1Label, but it does not working.
Maybe some configurations overlay the wrapping behavior.
The following code is a example for this issue:

 
GRAPH FILE CAR
PRINT SEATS
BY MODEL
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET HAXIS '300'
ON GRAPH SET VAXIS '400'
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH HBAR
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_JS
   riserShadow: true,
   border: {width: 0},
   introAnimation: {
   enabled: true,
   duration: 1000}
*END
*GRAPH_SCRIPT
setO1LabelAutofit(false);
setTextWrap(getO1Label(),true);
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(false);
setDisplay (getO1Title(),false);
*END
END
 


Do you have any idea?

Thanks in advance!

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


WebFOCUS 8
Windows, All Outputs
January 05, 2017, 10:11 AM
Francis Mariani
The biggest problem we have is that almost everything we thought we knew about WebFOCUS charts is thrown out the window when turning on JS Charts. In the slightly altered code below, you will see that the O1 labels are wrapped. I had to make the chart bigger and also control the font size to make this work. Now, turn on JS Charts and the wrapping stops working. This would normally suggest we must turn on wrapping in the JS Chart part of the stylesheet (*GRAPH_JS), but I bet there is no such thing.

GRAPH FILE CAR
PRINT SEATS
BY MODEL
-*ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET HAXIS '600'
ON GRAPH SET VAXIS '700'
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH HBAR
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *

*GRAPH_SCRIPT

setFontSizeAbsolute(getO1Label(),true);
setFontSize(getO1Label(),8);
setTextWrap(getO1Label(),true);

setFontSizeAbsolute(getY1Label(),true);
setFontSize(getY1Label(),8);
setTextWrap(getY1Label(),true);

setFontSizeAbsolute(getY1Title(),true);
setFontSize(getY1Title(),6);


setO1LabelAutofit(false);
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(false);
setDisplay (getO1Title(),false);
*END
END



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
January 05, 2017, 10:14 AM
Francis Mariani
The word "wrap" is not found in the 'Creating HTML5 Charts With WebFOCUS Language 8.0.08' PDF document (wfjschart.pdf).


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
January 05, 2017, 11:19 AM
Amom
Hello Francis,

Thank you by answers.
I found these configuration options in the WebFOCUS Graphics Release 8.1 Version 05 (wf81graph.pdf).
In this documentation there are some ways to do this (pages 1008, 441 and 463), but neigther of them are working properly or I am doing something wrong.

Thanks in advance

Regards


WebFOCUS 8
Windows, All Outputs
January 05, 2017, 12:14 PM
Francis Mariani
The stuff in "WebFOCUS Graphics Release 8.1 Version 05" very often is not compatible with JS Charts, also called HTML5 Charts. I would open a case with IBI to ask why.


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
January 05, 2017, 12:20 PM
Amom
Thank you very much...


WebFOCUS 8
Windows, All Outputs
January 05, 2017, 12:23 PM
Amom
I did not find any wrap method in the JS Chart API reference...

http://www.jscharts.com/how-to-use-reference


WebFOCUS 8
Windows, All Outputs
January 05, 2017, 12:42 PM
Francis Mariani
That's not the API that WebFOCUS uses. This is:

Three D Graphics - Js:Chart.

When you create an HTML5 Chart (JS Chart), this library is referenced in the source code:

<script type='text/javascript' src='/ibi_apps/tdg/jschart/distribution/tdgchart-min.js'></script>


which is the same library referenced in the examples on the Three D Graphics website. They are also the makers of Perspective For Java, which is the non-HTML5 chart engine that WebFOCUS uses. These two don't work together very well, and that's sad.


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
January 06, 2017, 06:20 AM
Amom
Good to know!

thanks Francis...


WebFOCUS 8
Windows, All Outputs