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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] setTextRotation is skipping alternate x-axis labels

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] setTextRotation is skipping alternate x-axis labels
 Login/Join
 
Platinum Member
posted
Hi Everyone,

I am using setTextRotation in one of my charts. When I use
setTextRotation(getO1Label(),0);. My axis labels are skipped. For example January is displayed and February is skipped, March is displayed and April is skipped so on. But this won't happen if I use setTextRotation(getO1Label(),1); ,setTextRotation(getO1Label(),2); and setTextRotation(getO1Label(),3);. I have included my code below. Please let me know your inputs on this.
  

ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
-DEFAULTH &WF_HTMLENCODE=OFF;
SET HTMLENCODE=&WF_HTMLENCODE

SET ARGRAPHENGINE=JSCHART
-DEFAULTH &WF_EMPTYREPORT=ON;
SET EMPTYREPORT=&WF_EMPTYREPORT

SET EMBEDHEADING=OFF
SET GRAPHDEFAULT=OFF
-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='405.0';
-DEFAULTH &WF_STYLE_WIDTH='770.0';

-DEFAULTH &WF_TITLE='WebFOCUS Report';

DEFINE FILE wf_retail_lite
YEAR_ALPHA/A4=FPRINT(TIME_YEAR,'I4',YEAR_ALPHA);
MONTH_FULL/A10=IF TIME_MTHNAME EQ 'JAN' THEN 'January' ELSE IF TIME_MTHNAME EQ 'FEB' THEN 'February' ELSE IF TIME_MTHNAME EQ 'MAR' THEN 'March'
ELSE IF TIME_MTHNAME EQ 'APR' THEN 'April' 
ELSE IF TIME_MTHNAME EQ 'MAY' THEN 'May' 
ELSE IF TIME_MTHNAME EQ 'JUN' THEN 'June' 
ELSE IF TIME_MTHNAME EQ 'JUL' THEN 'July' 
ELSE IF TIME_MTHNAME EQ 'AUG' THEN 'August' 
ELSE IF TIME_MTHNAME EQ 'SEP' THEN 'September' 
ELSE IF TIME_MTHNAME EQ 'OCT' THEN 'October' 
ELSE IF TIME_MTHNAME EQ 'NOV' THEN 'November' 
ELSE IF TIME_MTHNAME EQ 'DEC' THEN 'December';
YEAR_MONTH/A15V=MONTH_FULL|' '|YEAR_ALPHA;
END
GRAPH FILE wf_retail_lite
SUM WF_RETAIL_LITE.WF_RETAIL_SALES.REVENUE_US
BY WF_RETAIL_LITE.WF_RETAIL_TIME_SALES.TIME_YEARMTH NOPRINT
BY YEAR_MONTH AS 'Year Month'
WHERE WF_RETAIL_LITE.WF_RETAIL_GEOGRAPHY_STORE.COUNTRY_NAME EQ 'United States';
WHERE WF_RETAIL_LITE.WF_RETAIL_TIME_SALES.TIME_YEARMTH GE 201601;
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO ON
ON GRAPH SET GRWIDTH 1
ON GRAPH SET UNITS &WF_STYLE_UNITS
ON GRAPH SET HAXIS &WF_STYLE_WIDTH
ON GRAPH SET VAXIS &WF_STYLE_HEIGHT
ON GRAPH SET LOOKGRAPH BAR
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setPlace(true);
setCurveFitEquationDisplay(false);

*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $
TYPE=DATA, COLUMN=N1, BUCKET=x-axis, $
TYPE=DATA, COLUMN=N2, BUCKET=x-axis, $
TYPE=DATA, COLUMN=N3, BUCKET=y-axis, $
-*TYPE=DATA, COLUMN=N4, BUCKET=y-axis, $
TYPE=HEADING, JUSTIFY=LEFT,$
TYPE=HEADING, LINE=1, ITEM=1, OBJECT=TEXT, FONT='ARIAL', SIZE=13,STYLE=BOLD,COLOR=RGB(255 255 255), $
TYPE=HEADING, LINE=1, ITEM=1, OBJECT=FIELD, FONT='ARIAL', SIZE=13,STYLE=BOLD,COLOR=RGB(255 255 255), $
TYPE=HEADING, LINE=1, ITEM=2, OBJECT=TEXT, FONT='ARIAL', SIZE=13,STYLE=BOLD,COLOR=RGB(255 255 255), $
*GRAPH_SCRIPT

setReportParsingErrors(false);
setSelectionEnableMove(false);
setFillColor(getSeries(*),new Color(253, 141, 98));
setTransparentBorderColor(getSeries(*), true);
setDisplay(getO1Title(),false);
setDisplay(getY1Title(),false);
setFillMissingData(1);
setTextFormatPreset(getY1Label(),0);
setDisplay(getY1MajorGrid(),true);
setTextRotation(getO1Label(),0);
setLabelStagger(getO1Label(),false);
*GRAPH_JS_FINAL
"xaxis": {
    "title": {
        "visible": false
    }
},
"yaxis": {
    "title": {
        "visible": false
    }
}
*END
ENDSTYLE
END
-RUN
-HTMLFORM BEGIN
<head>
    <style>
			div#jschart_HOLD_0 div {
            border: 0 !important;
		}
    </style>
</head>
-HTMLFORM END

This message has been edited. Last edited by: FP Mod Chuck,


Webfocus 8105/8202
Windows
All Outputs
 
Posts: 106 | Registered: June 26, 2018Report This Post
Platinum Member
posted Hide Post
I think it is skipping labels because there is not enough space to display them without overlapping.


WebFOCUS 8.2.06
 
Posts: 210 | Location: Sterling Heights, Michigan | Registered: October 19, 2010Report This Post
Platinum Member
posted Hide Post
Okay. I tried increasing the &WF_STYLE_WIDTH, It did not have any affect.


Webfocus 8105/8202
Windows
All Outputs
 
Posts: 106 | Registered: June 26, 2018Report This Post
Platinum Member
posted Hide Post
Your options are documented here: Controlling the X-Axis Label Layout

For example, Try this code:
 
ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
-DEFAULTH &WF_HTMLENCODE=OFF;
SET HTMLENCODE=&WF_HTMLENCODE

SET ARGRAPHENGINE=JSCHART
-DEFAULTH &WF_EMPTYREPORT=ON;
SET EMPTYREPORT=&WF_EMPTYREPORT

SET EMBEDHEADING=OFF
SET GRAPHDEFAULT=OFF
-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='405.0';
-DEFAULTH &WF_STYLE_WIDTH='770.0';

-DEFAULTH &WF_TITLE='WebFOCUS Report';

DEFINE FILE wf_retail_lite
YEAR_ALPHA/A4=FPRINT(TIME_YEAR,'I4',YEAR_ALPHA);
MONTH_FULL/A10=IF TIME_MTHNAME EQ 'JAN' THEN 'January' ELSE IF TIME_MTHNAME EQ 'FEB' THEN 'February' ELSE IF TIME_MTHNAME EQ 'MAR' THEN 'March'
ELSE IF TIME_MTHNAME EQ 'APR' THEN 'April' 
ELSE IF TIME_MTHNAME EQ 'MAY' THEN 'May' 
ELSE IF TIME_MTHNAME EQ 'JUN' THEN 'June' 
ELSE IF TIME_MTHNAME EQ 'JUL' THEN 'July' 
ELSE IF TIME_MTHNAME EQ 'AUG' THEN 'August' 
ELSE IF TIME_MTHNAME EQ 'SEP' THEN 'September' 
ELSE IF TIME_MTHNAME EQ 'OCT' THEN 'October' 
ELSE IF TIME_MTHNAME EQ 'NOV' THEN 'November' 
ELSE IF TIME_MTHNAME EQ 'DEC' THEN 'December';
YEAR_MONTH/A15V=MONTH_FULL|' '|YEAR_ALPHA;
END
GRAPH FILE wf_retail_lite
SUM WF_RETAIL_LITE.WF_RETAIL_SALES.REVENUE_US
BY WF_RETAIL_LITE.WF_RETAIL_TIME_SALES.TIME_YEARMTH NOPRINT
BY YEAR_MONTH AS 'Year Month'
WHERE WF_RETAIL_LITE.WF_RETAIL_GEOGRAPHY_STORE.COUNTRY_NAME EQ 'United States';
WHERE WF_RETAIL_LITE.WF_RETAIL_TIME_SALES.TIME_YEARMTH GE 201601;
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO ON
ON GRAPH SET GRWIDTH 1
ON GRAPH SET UNITS &WF_STYLE_UNITS
ON GRAPH SET HAXIS &WF_STYLE_WIDTH
ON GRAPH SET VAXIS &WF_STYLE_HEIGHT
ON GRAPH SET LOOKGRAPH BAR
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setPlace(true);
setCurveFitEquationDisplay(false);

*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $
TYPE=DATA, COLUMN=N1, BUCKET=x-axis, $
TYPE=DATA, COLUMN=N2, BUCKET=x-axis, $
TYPE=DATA, COLUMN=N3, BUCKET=y-axis, $
-*TYPE=DATA, COLUMN=N4, BUCKET=y-axis, $
TYPE=HEADING, JUSTIFY=LEFT,$
TYPE=HEADING, LINE=1, ITEM=1, OBJECT=TEXT, FONT='ARIAL', SIZE=13,STYLE=BOLD,COLOR=RGB(255 255 255), $
TYPE=HEADING, LINE=1, ITEM=1, OBJECT=FIELD, FONT='ARIAL', SIZE=13,STYLE=BOLD,COLOR=RGB(255 255 255), $
TYPE=HEADING, LINE=1, ITEM=2, OBJECT=TEXT, FONT='ARIAL', SIZE=13,STYLE=BOLD,COLOR=RGB(255 255 255), $
*GRAPH_SCRIPT

setReportParsingErrors(false);
setSelectionEnableMove(false);
setFillColor(getSeries(*),new Color(253, 141, 98));
setTransparentBorderColor(getSeries(*), true);
setDisplay(getO1Title(),false);
setDisplay(getY1Title(),false);
setFillMissingData(1);
setTextFormatPreset(getY1Label(),0);
setDisplay(getY1MajorGrid(),true);
setTextRotation(getO1Label(),0);
setLabelStagger(getO1Label(),false);
*GRAPH_JS_FINAL
"xaxis": {
    "title": {
        "visible": false
    },
    "labelLayout": {
        "skip": 0,
        "stagger": false,
        "truncate": false 
    }
},
"yaxis": {
    "title": {
        "visible": false
    }
}
*END
ENDSTYLE
END
-RUN
-HTMLFORM BEGIN
<head>
    <style>
			div#jschart_HOLD_0 div {
            border: 0 !important;
		}
    </style>
</head>
-HTMLFORM END 


WebFOCUS 8.2.06
 
Posts: 210 | Location: Sterling Heights, Michigan | Registered: October 19, 2010Report This Post
Platinum Member
posted Hide Post
dbeagan, Thank you for your inputs on this. All labels are displayed, But, for months with more letters like January 2016 or November 2016 it merges with the next label.


Webfocus 8105/8202
Windows
All Outputs
 
Posts: 106 | Registered: June 26, 2018Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] setTextRotation is skipping alternate x-axis labels

Copyright © 1996-2020 Information Builders