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.
I've tried multiple methods mentioned in the documentation to try and skip labels with a JSCHART, but everything only seems to work with non-JSCHART formats.
I searched and found an older thread (https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/8707084976?r=6077084976#6077084976) where people were discussing this same issue.
Most of the variants I've tried have been the AutoSkip get/set commands, eg
Code below provided by Francis a couple of years ago. I got it to work.
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
setAutoSkip(getO1Label(),2); // sets or disables label skip for labels
setPlaceSkip(getO1Label(),0);
setSkipBegin(getO1Label(),0); // sets the first label to skip
setSkipCount(getO1Label(),1); // sets the interval of labels to skip after setSkipBegin()
WebFOCUS 8206, Unix, Windows
Posts: 1853 | Location: New York City | Registered: December 30, 2015
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 wfretail82/wf_retail_tiny
-* Created by Info Assist for Graph
SUM WF_RETAIL_TINY.WF_RETAIL_SALES.COGS_US
WF_RETAIL_TINY.WF_RETAIL_SALES.DISCOUNT_US
WF_RETAIL_TINY.WF_RETAIL_SALES.GROSS_PROFIT_US
BY WF_RETAIL_TINY.WF_RETAIL_TIME_SALES.TIME_DATE
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET ARGRAPHENGIN JSCHART
ON GRAPH SET EMBEDHEADING ON
ON GRAPH SET VZERO OFF
ON GRAPH SET GRWIDTH 1
ON GRAPH SET AUTOFIT ON
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);
setCurveFitEquationDisplay(false);
setPlace(true);
*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, ORIENTATION=LANDSCAPE, $
TYPE=DATA, COLUMN=N1, BUCKET=x-axis, $
TYPE=DATA, COLUMN=N2, BUCKET=y-axis, $
TYPE=DATA, COLUMN=N3, BUCKET=y-axis, $
TYPE=DATA, COLUMN=N4, BUCKET=y-axis, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
setAutoSkip(getO1Label(),2); // sets or disables label skip for labels
setPlaceSkip(getO1Label(),0);
setSkipBegin(getO1Label(),0); // sets the first label to skip
setSkipCount(getO1Label(),1); // sets the interval of labels to skip after setSkipBegin()
;
*GRAPH_JS_FINAL
"introAnimation": {
"enabled": true
}
*END
ENDSTYLE
END
-RUN
WebFOCUS 8206, Unix, Windows
Posts: 1853 | Location: New York City | Registered: December 30, 2015
Babak, try the following and you'll see that the AutoSkip doesn't work for a JSCHART when it does for JPEG
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
SUM RETAIL_COST
BY CAR
-* -* setAutoSkip has no effect
ON GRAPH PCHOLD FORMAT JSCHART
-* -* setAutoSkip does make a difference in JPEG
-*ON GRAPH PCHOLD FORMAT JPEG
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET ARGRAPHENGIN JSCHART
ON GRAPH SET EMBEDHEADING ON
ON GRAPH SET VZERO OFF
ON GRAPH SET GRWIDTH 1
ON GRAPH SET AUTOFIT ON
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);
setCurveFitEquationDisplay(false);
setPlace(true);
*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/ENIADefault_combine.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, ORIENTATION=LANDSCAPE, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
setAutoSkip(getO1Label(),2); // sets or disables label skip for labels
setPlaceSkip(getO1Label(),0);
setSkipBegin(getO1Label(),0); // sets the first label to skip
setSkipCount(getO1Label(),1); // sets the interval of labels to skip after setSkipBegin()
;
*GRAPH_JS_FINAL
"introAnimation": {
"enabled": true
}
*END
ENDSTYLE
END
-RUN
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013
The "skip" option for JSCHART output defaults to true, so you should not have to add anything other than the assignment of the "buckets" for an chart format of BAR.
Doesn't appear to work with horizontal bar output. However, vertical bar works fine.
You do need to have a fair number or items for your axis though, which is why using the CAR file is not so good.
If you run the following, you'll see what I mean. Run the report and change the width of the window. Notice the axis labels changing.
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 wf_retail
SUM COGS_US
BY TIME_DATE
WHERE TIME_YEAR EQ 2008
-* -* setAutoSkip has no effect
ON GRAPH PCHOLD FORMAT JSCHART
-* -* setAutoSkip does make a difference in JPEG
-*ON GRAPH PCHOLD FORMAT JPEG
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET ARGRAPHENGIN JSCHART
ON GRAPH SET EMBEDHEADING ON
ON GRAPH SET VZERO OFF
ON GRAPH SET GRWIDTH 1
ON GRAPH SET AUTOFIT ON
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);
setCurveFitEquationDisplay(false);
setPlace(true);
*END
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, ORIENTATION=LANDSCAPE, $
TYPE=DATA, COLUMN=N1, BUCKET=x-axis, $
TYPE=DATA, COLUMN=N2, BUCKET=y-axis, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
*GRAPH_JS_FINAL
"introAnimation": {
"enabled": true
}
*END
ENDSTYLE
END
-RUN
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
Tony, I was not aware of that bucket feature and that is better than what I previously had. It's actually probably better than what I was hoping for as it is dynamic in how it changes.
Martin is right though that I was wanting to have the ability to say how many labels to skip (ie the user wanted to only show a label every 6 months, instead of every month on the axis)
WF 8.2.0.3 Windows 10 64bit HTML, AHTML, PDF, Excel
I want to give static labels to my x-axis which is showing number of days. I want to limit it from 0 - 60 with increment of 5. I have tried everything that is given in documentation HAUTO, HMAX, HMIN, HTICK. Nothing works for me. I am attaching the graph how it currently looks. Please HELP! [FLASH_VIDEO]
My Bad I don't know how to add picture to it. Basically it generates random numbers on X-axis which I want to be uniform so that my graph which is line chart looks more relevant. I am adding my code this time.
ENGINE INT CACHE SET ON
-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='400.0';
-DEFAULTH &WF_STYLE_WIDTH='500.0';
-DEFAULTH &WF_TITLE='WebFOCUS Report';
-DEFAULTH &HIGHVAL='60';
-DEFAULTH &MINVAL='0';
SET VAUTO=OFF, VMIN=0, VMAX=100,VTICK=10
DEFINE FILE install_repair_offer_select_sec
DAYS/D12.2 = HRS_REC_TO_COMPL / 24;
CNT/I10 = IF HRS_REC_TO_COMPL EQ MISSING THEN 0 ELSE 1;
END
GRAPH FILE install_repair_offer_select_sec
-* Created by Info Assist for Graph
SUM COMPUTE CMT_DAYS/I10 = LAST CMT_DAYS + CNT; NOPRINT
COMPUTE PER_COMP/D12% = (CMT_DAYS / TOT.CNT)*100;
BY DAYS
WHERE JOB_TGT_DUE_DTTM GE '2017/08/01';
WHERE JOB_TGT_DUE_DTTM LE '2017/08/07';
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET ARGRAPHENGIN JSCHART
ON GRAPH SET EMBEDHEADING ON
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
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 GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET HAUTO OFF
ON GRAPH SET HMIN 0
ON GRAPH SET HMAX 60
ON GRAPH SET HTICK 5
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH VLINE
ON GRAPH SET AUTOFIT OFF
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
-*setuseseriesshapes(true);
-*setmarkersizedefault(50);
-*setAutoSkip(getO1Label(),2);
-*setPlaceSkip(getO1Label(),0);
-*setSkipBegin(getO1Label(),0);
-*setSkipCount(getO1Label(),5);
setScaleMaxAuto(getX1Axis(),false);
setScaleMinAuto(getX1Axis(),false);
setScaleMax(getX1Axis(),&HIGHVAL);
setScaleMin(getX1Axis(),&MINVAL );
*END
*GRAPH_JS
border: {width: 2, color: 'teal'},
blaProperties: {lineConnection: 'curved'},
xaxisNumeric: {
min: 0,
max: 60
}
*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/ENIADefault_combine.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
*END
ENDSTYLE
END
-RUN
-*IA_GRAPH_FINISH