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     [SOLVED] Overlapping charts in HTML forms

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Overlapping charts in HTML forms
 Login/Join
 
Gold member
posted
Hi all,

I'm new to working in HTML forms. I created a portal once and I was able to overlap 4 charts in the same panel and drill down via the bars in the graph and display a different graph.

My question, in HTML forms am I able to overlap 2 charts and trigger the charts based on passing a parameter using if statements. If the selection is region then display region chart for selected region. if the selection is country the display the chart that displays the country chart.

Thanks for any help in advance!

This message has been edited. Last edited by: Tamra,


WebFOCUS 8
Windows, All Outputs
 
Posts: 88 | Registered: December 06, 2016Report This Post
Master
posted Hide Post
If I understand you correctly, you may find this thread useful:

[CLOSED]Need Help in JRunning animation and Java script


App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
 
Posts: 594 | Location: Michigan | Registered: September 04, 2015Report This Post
Master
posted Hide Post
The JavaScript command to trigger your chart would look something like this:

IbComposer_triggerExecution("task2",1);


App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
 
Posts: 594 | Location: Michigan | Registered: September 04, 2015Report This Post
Gold member
posted Hide Post
of course it needs javascript!

thanks Squatch!


WebFOCUS 8
Windows, All Outputs
 
Posts: 88 | Registered: December 06, 2016Report This Post
Gold member
posted Hide Post
Hey Squatch,

With further researching, I found this:

Create FEX which controls what you execute.

IF radiobutton tells that its "DETAILS" then include detailed fex otherwise summary fex. Also there is SET command to say in which frame to execute the report.


I would like to try and accomplish this through a FEX file instead of javascript, as I'm not too knowledgeable with js. Would I have to create a totally new FEX to manage the switching between to iframes? Or can I accomplish this through one of the graph files?


WebFOCUS 8
Windows, All Outputs
 
Posts: 88 | Registered: December 06, 2016Report This Post
Master
posted Hide Post
I don't know anything about the FEX control you're referring to...

However, this may be simpler than I thought it was. If you just want to have one display area for multiple reports, you should be able to (in App Studio) create one iframe and target multiple FEXes/Reports to it using the "Tasks" panel.

On the selection of a radio button, you can have the task fire and fill the iframe with the report.


App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
 
Posts: 594 | Location: Michigan | Registered: September 04, 2015Report This Post
Gold member
posted Hide Post
there may be a problem? I'm basing this off the selection of a multi-select picklist. Would that be an issue.

For example, if the user makes a selection of a region, then show country chart. If the user doesn't select a region, then show all regions. does that make sense?


WebFOCUS 8
Windows, All Outputs
 
Posts: 88 | Registered: December 06, 2016Report This Post
Master
posted Hide Post
Okay, so I think what you need to do is have one FEX that is capable of running multiple charts. Now I understand the meaning of your first post better.

Yes, you can use parameters in your FEX combined with IF statements to determine which chart to run.

So "ALL" in WebFOCUS means "_FOC_NULL" gets passed as a parameter to your FEX. You can use that information to determine whether to show REGION or COUNTRY charts.

Here is an example from the CAR file. The CAR field will substitute for your REGION and MODEL will substitute for your COUNTRY. If you choose "No selection" it means the same thing as "ALL". So choosing "No selection" for CAR will result in a CAR (REGION) graph showing, but selecting one or more CARs (REGIONs) will result in selected MODELs (COUNTRYs) showing instead. Don't run this in App Studio, it will probably error out complaining about the CAR amper variable. Drop the code into an App Studio command console instead, then do a "Save As" and it should save as a FEX file. You can then run it from the WebFOCUS portal to see how it works.

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';

-IF &CAR NE '_FOC_NULL' GOTO SKIP_TO_MODEL;

GRAPH FILE ibisamp/car
-* Created by Info Assist for Graph
SUM CAR.BODY.SALES
BY CAR.COMP.CAR
WHERE CAR.COMP.CAR EQ &CAR.(OR(FIND CAR.COMP.CAR IN CAR |FORMAT=A16)).CAR ( = "REGION" ):.;
-*WHERE CAR.CARREC.MODEL EQ '&MODEL.(FIND CAR.CARREC.MODEL IN CAR |FORMAT=A24).MODEL:.';
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET ARGRAPHENGIN JSCHART
ON GRAPH SET VZERO OFF
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 GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH VBAR
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, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);

*END
ENDSTYLE
END

-RUN

-GOTO SKIP_TO_END ;

-SKIP_TO_MODEL

GRAPH FILE ibisamp/car
-* Created by Info Assist for Graph
SUM CAR.BODY.SALES
BY CAR.CARREC.MODEL
WHERE CAR.COMP.CAR EQ &CAR.(OR(FIND CAR.COMP.CAR IN CAR |FORMAT=A16)).CAR:.;
WHERE CAR.CARREC.MODEL EQ &MODEL.(OR(FIND CAR.CARREC.MODEL IN CAR |FORMAT=A24)).MODEL ( = "COUNTRY" ):.;
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET ARGRAPHENGIN JSCHART
ON GRAPH SET VZERO OFF
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 GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH VBAR
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, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);

*END
ENDSTYLE
END

-RUN

-SKIP_TO_END
-EXIT


App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
 
Posts: 594 | Location: Michigan | Registered: September 04, 2015Report This Post
Gold member
posted Hide Post
Wow, thank you so much Squatch! That's exactly what I was looking for. I need to work on portraying what I want in these posts better. Works perfectly! Cheers!


WebFOCUS 8
Windows, All Outputs
 
Posts: 88 | Registered: December 06, 2016Report 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     [SOLVED] Overlapping charts in HTML forms

Copyright © 1996-2020 Information Builders