Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] setTextRotation is skipping alternate x-axis labels
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] setTextRotation is skipping alternate x-axis labels
 Login/Join
 
Gold 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: 89 | Registered: June 26, 2018Reply With QuoteReport This Post
Platinum Member
posted Hide Post
I think it is skipping labels because there is not enough space to display them without overlapping.


WF 8.2.06
Win10 / IE11
AHTML EXL2K PDF
 
Posts: 180 | Registered: October 19, 2010Reply With QuoteReport This Post
Gold 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: 89 | Registered: June 26, 2018Reply With QuoteReport 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 


WF 8.2.06
Win10 / IE11
AHTML EXL2K PDF
 
Posts: 180 | Registered: October 19, 2010Reply With QuoteReport This Post
Gold 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: 89 | Registered: June 26, 2018Reply With QuoteReport This Post
  Powered by Social Strata  
 

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-2018 Information Builders, leaders in enterprise business intelligence.