Focal Point
[SOLVED]rotate data label in a bar chart

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

May 25, 2016, 01:41 PM
Sherly
[SOLVED]rotate data label in a bar chart
how to rotate a data label in a bar chart?
My data labels are displayed in a horizontal position and I want to display in a vertical position. Any help

setTextRotation(getDataText(),1);

This message has been edited. Last edited by: <Emily McAllister>,


WebFocus 8.x
Hyperstage
May 25, 2016, 03:06 PM
Squatch
If you are using GUI software to create this chart, right click on the label, select "Rotate" and then "90".


App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
May 25, 2016, 03:13 PM
Squatch
If you are not using the GUI, here's what the chart looks like in plain text:

ENGINE INT CACHE SET ON
-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='405.0';
-DEFAULTH &WF_STYLE_WIDTH='770.0';
-DEFAULTH &WF_TITLE='WebFOCUS Report';
GRAPH FILE car
-* Created by Info Assist for Graph
SUM CAR.BODY.SALES
BY CAR.COMP.CAR
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET UNITS &WF_STYLE_UNITS
ON GRAPH SET HAXIS &WF_STYLE_WIDTH
ON GRAPH SET VAXIS &WF_STYLE_HEIGHT
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
*END
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
setTextRotation(getO1Label(),1);
*END
ENDSTYLE
END
-RUN

The line you are interested in is:

setTextRotation(getO1Label(),1);



App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
June 10, 2016, 10:12 AM
Sherly
No it did not work.
I need to rotate the text inside the bar not the label.


WebFocus 8.x
Hyperstage
June 10, 2016, 12:15 PM
Sherly
I figured out the issue

setTextRotation(getDataText(),1);


WebFocus 8.x
Hyperstage
June 14, 2016, 11:09 AM
Bharathi
Hi,
data labels are overlapping with the bar after rotating and number is not visible properly as I have two series in different colors.
Is there any way to give some space between bar and data label?

Thank you!


WebFOCUS 8.1.05
Windows, All Outputs
June 14, 2016, 04:53 PM
Ram Prasad E
Bharathi,
Title of this post says "Solved".
You need to open a new post with sample code using CAR file to reproduce your issue.

Thanks,
Ram


WebFOCUS 8.1.05
Windows
http://ibiwebfocus.wordpress.com
https://www.facebook.com/groups/ibi.webfocus/