Merin Joseph Posted September 21, 2023 Share Posted September 21, 2023 For example if i have selected a date range jan1st to end of Jan from a dropdown it displays a result. then i need another dropdown for 'compare to date:' were if I selected Feb 1st to end of Feb, then it should display another chart next to each other. Link to comment Share on other sites More sharing options...
David Beagan Posted September 21, 2023 Share Posted September 21, 2023 I guess the best way could vary depending on your requirements. Suppose you have a couple of chart fexes each with its own parameters for beginning and ending dates. Then you could use Designer (Assemble Visualizations) to arrange the charts side by side and provide the parameter date entry inputs.Or you could use App Studio's HTML Canvas to arrange the charts side by side and provide for the date range parameter entry. Link to comment Share on other sites More sharing options...
Solution David Beagan Posted September 22, 2023 Solution Share Posted September 22, 2023 A simpler approach could be accomplished with a single with the code for both charts. There is a basic feature for displaying side by side reports or charts as documented in How to Control Multiple Reports From a Procedure, page 265. With both reports being coded in a single fex, when the fex is run, the two chart outputs will appear side by side. Autoprompt can be used to promopt for all the date parameters. Here's an example after the fex is run, parameters selected and Submit pressed.Here is the code for you to try it:-TYPE WEBFOCUS CGIVAR IBIWF_mreports=FRAME -TYPE WEBFOCUS CGIVAR IBIWF_mrcolumns=2 DEFINE FILE ggsales AMP_YYMD/YYMD = &YYMD; DATE_YYMD/YYMD = AMP_YYMD - SEQ_NO + 1; DATE_YYMt/YYBMt = DATE_YYMD; DATE_D/D = DATE_YYMD; END GRAPH FILE ggsales SUM UNITS AS '' BY DATE_YYMt AS '' BY DATE_D AS '' WHERE DATE_YYMD GE '&STR_DATE1.(|FORMAT=YYMD).' WHERE DATE_YYMD LE '&END_DATE1.(|FORMAT=YYMD).' ON GRAPH PCHOLD FORMAT JSCHART ON GRAPH SET LOOKGRAPH BAR ON GRAPH SET AUTOFIT ON ON GRAPH SET STYLE *TYPE=DATA, COLUMN=N1, BUCKET=x-axis, $TYPE=DATA, COLUMN=N2, BUCKET=x-axis, $TYPE=DATA, COLUMN=N3, BUCKET=y-axis, $INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$*GRAPH_JS_FINAL"xaxis": { "labels": { "nestingConcatSymbol": undefined } }*ENDENDSTYLEEND GRAPH FILE ggsales SUM UNITS AS '' BY DATE_YYMt AS '' BY DATE_D AS '' WHERE DATE_YYMD GE '&STR_DATE2.(|FORMAT=YYMD).' WHERE DATE_YYMD LE '&END_DATE2.(|FORMAT=YYMD).' ON GRAPH PCHOLD FORMAT JSCHART ON GRAPH SET LOOKGRAPH BAR ON GRAPH SET AUTOFIT ON ON GRAPH SET STYLE *TYPE=DATA, COLUMN=N1, BUCKET=x-axis, $TYPE=DATA, COLUMN=N2, BUCKET=x-axis, $TYPE=DATA, COLUMN=N3, BUCKET=y-axis, $INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$*GRAPH_JS_FINAL"xaxis": { "labels": { "nestingConcatSymbol": undefined } }*ENDENDSTYLEEND Link to comment Share on other sites More sharing options...
Merin Joseph Posted September 25, 2023 Author Share Posted September 25, 2023 Awesome. Thanks David. Thanks for sharing this document . Link to comment Share on other sites More sharing options...
David Beagan Posted September 26, 2023 Share Posted September 26, 2023 You are welcome. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now