Focal Point
[CLOSED] x-axis labels

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

September 09, 2009, 10:23 AM
arsalan
[CLOSED] x-axis labels
On a bar and line graph, I need to change the way year-quarter is being displayed on x-axis. But I do not want to change the actual vlaues because the bars are links to an excel report that pass year-quarter vlaue.

I tried a DEFINE field and then passing it in
setGroupLabelArray(YRQTR_D);
but that doesn't show any labels at all.

Is there an alternate to handle this.

This message has been edited. Last edited by: Kerry,
September 10, 2009, 03:51 AM
<JG>
arsalan

setGroupLabelArray(); is an array of actual label values not a single column name created in a define

Actually for some strange reason it has completely dissappeared as an API call from the latest
documentation

The call should look like

setGroupLabelArray("label1","label2","label3","label4","label5");

If you want to generate this dynamically then you do the following

 TABLE FILE CAR
SUM
COMPUTE NEWLABEL/A50= 'new label for\n'||COUNTRY;
BY COUNTRY NOPRINT
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE SAVE FORMAT COM
END
-RUN
GRAPH FILE CAR
SUM DEALER_COST
ACROSS COUNTRY AS 'COUNTRY'
ON GRAPH SET GRAPHEDIT SERVER
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF
ON GRAPH SET VZERO ON
ON GRAPH SET GRID ON
ON GRAPH SET GRAPHSTYLE *

setTextRotation(getO1Label(),0);
setGroupLabelArray(
-INCLUDE SAVE
);
ENDSTYLE
END