Jump to content
The ibi Community has moved to a new platform: Please Sign In and choose Forgot Password to continue

I have a line chart that is showing sales information from m...


Robert Kottelenberg

Recommended Posts

I tried a few different things that didnt work out. But this technique could work and I can create it entirely in InfoAssist:

-*COMPONENT=Define_ggsales

DEFINE FILE ibisamp/ggsales

DateYYMD/YYMD=AYMD ( &DATEH8 , -SEQ_NO , 'I8YYMD' ) ;

DateMt/Mt=DateYYMD ;

DateD/D=DateYYMD ;

DateDB/I2=DateD;

DateW/W=DateYYMD;

DateDA2/A2=IF DateW EQ 1 THEN EDIT(DateDB,'99') ELSE ' ';

END

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=ON

SET GRAPHDEFAULT=OFF

-DEFAULTH &WF_ARVERSION=2;

SET ARVERSION=&WF_ARVERSION

 

-DEFAULTH &WF_STYLE_UNITS='PIXELS';

-DEFAULTH &WF_STYLE_HEIGHT='405.0';

-DEFAULTH &WF_STYLE_WIDTH='770.0';

 

-DEFAULTH &WF_TITLE='WebFOCUS Report';

GRAPH FILE ibisamp/ggsales

-* Created by Info Assist for Graph

SUM GGSALES.SALES01.SEQ_NO

BY DateYYMD NOPRINT

BY DateMt

BY DateDA2

WHERE GGSALES.SALES01.SEQ_NO LE 70;

ON GRAPH PCHOLD FORMAT JSCHART

ON GRAPH SET VZERO 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 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, ORIENTATION=LANDSCAPE, $

TYPE=DATA, COLUMN=N1, BUCKET=x-axis, $

TYPE=DATA, COLUMN=N2, BUCKET=x-axis, $

TYPE=DATA, COLUMN=N3, BUCKET=x-axis, $

TYPE=DATA, COLUMN=N4, BUCKET=y-axis, $

*GRAPH_SCRIPT

 

setReportParsingErrors(false);

setSelectionEnableMove(false);

setLabelStagger(getO1Label(),false);

setDisplay(getO1Title(),false);

*GRAPH_JS_FINAL

"xaxis": {

"labelLayout": {

"scroll": false

},

"labels": {

"nestingConcatSymbol": undefined

}

},

"yaxis": {

"title": {

"visible": false

}

}

 

*END

ENDSTYLE

END

 

-RUN

Link to comment
Share on other sites

I have a line chart that is showing sales information from multiple years. To be able to compare the years, the data is grouped by month and then by day. When using xaxis scroll false (so the entire chart fits in the frame), the second group (day) labels end up overlapping:

 

image.png875108 7.6 KB

 

Is their a way to have the secondary grouping only display labels that will fit I would even be fine if it only showed the 1, 15 and last day of the month

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...