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.
Is there a way we can merge 2 different graph types into 1?
What I'm trying to do is merge an Area Graph and a Scatter chart into one graph. I have 4 fields, X1, Y1, Y2, Y3 that would plot the Area Graph then over this graph, I want 2 fields, X2,Y4 to display as scatter points. Both X1 and X2 uses the same X axis and all Y* fields use the same Y axis.
GRMERGE only merges different fields into the same axis but still using the same graph type. Thank you for your assistance.This message has been edited. Last edited by: Anatess,
What I really want is overlaying one graph over another.
So, basically, I have a static area graph that shows different completion stages and how "feverish" that area is. So X is the completion percentage, Y is the buffer percentage. The area that corresponds to Y less than (.4X+10) is a low fever area. Above low fever but less than (.7X+20) is medium fever. Anything higher is high fever.
Then I have a scatter graph that shows individual project completions and their corresponding buffer.
Overlaying the scatter graph over the area graph would show where each project lies in the fever chart and is a quick visualization of the density of projects in each fever zone.
I don't know how to illustrate this using the CAR file...
OK, if you cannot do it using the CAR file, then can you provide the data you want plotted and show the application of the data points to the graph? Perhaps we can some MacGyver techniques.
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005
Anyone know if it's possible to great a graph with a "transparent" background? If so, Anatess could just create two graphs of identical size and truly "overlay" them by providing each with the exact same coordinates. Just a thought (with no testing involved--)
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
Darin, if we can figure that one out, that would be really great! Since the area graph is static, it can even be saved as an image without having to run a graph.
JG, thank you very very much! I think this will work. Just need to make sure the axes are spot-on (overlayed perfectly) and this should be okay. The axes are percentages, from 0 to 100, so it is static as well.
DEFINE FILE CAR
KNTR/I1 WITH SALES=KNTR + 1;
CCCOMPLETE/I11 WITH SALES=IF KNTR EQ 1 THEN 0 ELSE IF KNTR EQ 2 THEN 100 ELSE 0;
Y3/I3 WITH SALES=IF KNTR EQ 1 THEN 10 ELSE IF KNTR EQ 2 THEN 50 ELSE 0;
Y2/I3 WITH SALES=IF KNTR EQ 1 THEN 20 ELSE IF KNTR EQ 2 THEN 90 ELSE 0;
Y1/I3 WITH SALES=IF KNTR EQ 1 THEN 100 ELSE IF KNTR EQ 2 THEN 100 ELSE 0;
BUFFERIMPACT/I11 WITH SALES =IF KNTR EQ 1 THEN 0;
END
TABLE FILE CAR
PRINT
Y1
Y2
Y3
BUFFERIMPACT
BY CCCOMPLETE
WHERE RECORDLIMIT EQ 2
ON TABLE HOLD AS FVRBGRND
END
-RUN
GRAPH FILE FVRBGRND
SUM Y1 Y2 Y3 BUFFERIMPACT
ACROSS CCCOMPLETE IN-RANGES-OF 10
ON GRAPH SET LOOKGRAPH VAREA
ON GRAPH SET GRAPHEDIT SERVER
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF
ON GRAPH SET VZERO ON
ON GRAPH SET GRID ON
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET GRAPHSTYLE *
setScaleMaxAuto(getY1Axis(),false);
setScaleMax(getY1Axis(),100.0);
setExtendToFrameEdge(true);
setMarkerDisplay(true);
setConnectLineMarkers(false);
setConnectScatterMarkers(false);
setO1LabelDisplay(true);
setO1AxisSide(0);
setO1MajorGridDisplay(true);
setO1MajorGridStyle(0);
setO1MinorGridDisplay(false);
setAxisAssignment(0,0);
setSeriesType(0,3);
setAxisAssignment(1,0);
setSeriesType(1,3);
setAxisAssignment(2,0);
setSeriesType(2,3);
setAxisAssignment(3,0);
setSeriesType(3,2);
setY1LabelDisplay(true);
setY1AxisSide(0);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
setGridStyle(getY1MajorGrid(),3);
setGridStyle(getO1MajorGrid(),3);
setTextFormatPreset(getY1Label(),-1);
setTextFormatPattern(getY1Label(),"#.##");
setPieFeelerTextDisplay(1);
setPieLabelDisplay(0);
setTextFormatPreset(getPieSliceLabel(),1);
setRiserBorderMode(1);
setSeriesDefaultTransparentBorderColor(true);
setUseSeriesBorderDefaults(true);
setLegendDisplay(true);
setFontSizeAbsolute(getY1Title(),true);
setFontSizeAbsolute(getY1Label(),true);
setFontSizeAbsolute(getY2Title(),true);
setFontSizeAbsolute(getY2Label(),true);
setFontSizeAbsolute(getO1Title(),true);
setPlace(true);
setGridStepAuto(getY1MajorGrid(),false);
setGridStep(getY1MajorGrid(),10.0);
setTextRotation(getO1Label(),0);
setTextString(getY1Title(),"NUMBER1");
setDisplay(getY1Title(),true);
setTextString(getO1Title(),"NUMBER2");
setDisplay(getO1Title(),true);
setDisplay(getLegendArea(),false);
setMarkerSize(getSeries(0),0);
setMarkerSize(getSeries(1),0);
setMarkerSize(getSeries(2),0);
setMarkerSize(getSeries(3),50);
setFillColor(getSeries(3),new Color(0,0,0));
setMarkerShape(getSeries(3),6);
ENDSTYLE
ON GRAPH SET STYLE *
PAGESIZE='Letter',
LEFTMARGIN=0.250000,
RIGHTMARGIN=0.250000,
TOPMARGIN=0.250000,
BOTTOMMARGIN=0.250000,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
GRID=OFF,
FONT='TIMES NEW ROMAN',
SIZE=10,
BACKCOLOR='NONE',
STYLE=NORMAL,
$
TYPE=DATA,
ACROSSCOLUMN=N1,
COLOR='RED',
$
TYPE=DATA,
ACROSSCOLUMN=N2,
COLOR='YELLOW',
$
TYPE=DATA,
ACROSSCOLUMN=N3,
COLOR='GREEN',
$
ENDSTYLE
END
And here's the scatter. I commented out the background code because it will be different to your installation.
DEFINE FILE CAR
NUMBER1/I1= IF COUNTRY EQ 'ENGLAND' THEN 10 ELSE IF COUNTRY EQ 'JAPAN' THEN 20 ELSE IF COUNTRY EQ 'USA' THEN 30 ELSE 40;
NUMBER2/I1= IF COUNTRY EQ 'ENGLAND' THEN 20 ELSE IF COUNTRY EQ 'JAPAN' THEN 40 ELSE IF COUNTRY EQ 'USA' THEN 60 ELSE 80;
END
GRAPH FILE CAR
-* Created by Advanced Graph Assistant
PRINT NUMBER1
BY NUMBER2
ON GRAPH PCHOLD AS HOLD FORMAT PNG
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF
ON GRAPH SET VZERO ON
ON GRAPH SET GRID ON
ON GRAPH SET HAXIS 770
ON GRAPH SET VAXIS 405
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH SCATTERS
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET GRAPHSTYLE *
setReportParsingErrors(false);
setSelectionEnableMove(false);
setMarkerDisplay(true);
setConnectLineMarkers(false);
setConnectScatterMarkers(false);
setO1LabelDisplay(true);
setO1AxisSide(0);
setO1MajorGridDisplay(true);
setO1MajorGridStyle(0);
setO1MinorGridDisplay(false);
setAxisAssignment(0,0);
setY1LabelDisplay(true);
setY1AxisSide(0);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
setTextFormatPreset(getY1Label(),-1);
setTextFormatPattern(getY1Label(),"#.##");
setPieFeelerTextDisplay(1);
setPieLabelDisplay(0);
setTextFormatPreset(getPieSliceLabel(),1);
setRiserBorderMode(1);
setSeriesDefaultTransparentBorderColor(true);
setUseSeriesBorderDefaults(true);
setLegendDisplay(true);
setFontSizeAbsolute(getY1Title(),true);
setFontSizeAbsolute(getY1Label(),true);
setFontSizeAbsolute(getY2Title(),true);
setFontSizeAbsolute(getY2Label(),true);
setFontSizeAbsolute(getO1Title(),true);
setPlace(true);
setScaleMaxAuto(getX1Axis(),false);
setScaleMaxAuto(getY1Axis(),false);
setScaleMax(getY1Axis(),100.0);
setGridStepAuto(getY1MajorGrid(),false);
setGridStep(getY1MajorGrid(),10.0);
setGridStepAuto(getX1MajorGrid(),false);
setGridStep(getX1MajorGrid(),10.0);
-*setFillType(getChartBackground(),3);
-*setTextureURL(getChartBackground(),"/images/custom/fever_chart.jpg");
ENDSTYLE
ON GRAPH SET STYLE *
TYPE=REPORT, ORIENTATION=PORTRAIT, SQUEEZE=ON, $
TYPE=REPORT, FONT='TIMES NEW ROMAN', SIZE=10, GRID=OFF, $
ENDSTYLE
END
-SET &GRAPH=HHMMSS('A8');
-SET &GRAPH='fever_chart'||EDIT('&GRAPH.EVAL','99$99$99');
DEFINE FILE CAR
KNTR/I1 WITH SALES=KNTR + 1;
CCCOMPLETE/I11 WITH SALES=IF KNTR EQ 1 THEN 0 ELSE IF KNTR EQ 2 THEN 100 ELSE 0;
Y3/I3 WITH SALES=IF KNTR EQ 1 THEN 10 ELSE IF KNTR EQ 2 THEN 50 ELSE 0;
Y2/I3 WITH SALES=IF KNTR EQ 1 THEN 20 ELSE IF KNTR EQ 2 THEN 90 ELSE 0;
Y1/I3 WITH SALES=IF KNTR EQ 1 THEN 100 ELSE IF KNTR EQ 2 THEN 100 ELSE 0;
BUFFERIMPACT/I11 WITH SALES =IF KNTR EQ 1 THEN 0;
END
TABLE FILE CAR
PRINT
Y1
Y2
Y3
BUFFERIMPACT
BY CCCOMPLETE
WHERE RECORDLIMIT EQ 2
ON TABLE HOLD AS FVRBGRND
END
-RUN
GRAPH FILE FVRBGRND
SUM Y1 AS ''
Y2 AS ''
Y3 AS ''
BUFFERIMPACT AS ''
ACROSS CCCOMPLETE AS '' IN-RANGES-OF 10
ON GRAPH SET LOOKGRAPH VAREA
ON GRAPH SET GRAPHEDIT SERVER
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF
ON GRAPH SET HAXIS 770
ON GRAPH SET VAXIS 405
ON GRAPH SET VZERO ON
ON GRAPH SET GRID OFF
ON GRAPH HOLD AS &GRAPH.EVAL FORMAT JPEG
ON GRAPH SET GRAPHSTYLE *
setScaleMaxAuto(getY1Axis(),false);
setScaleMax(getY1Axis(),100.0);
setScaleMax(getO1Axis(),100.0);
setExtendToFrameEdge(true);
setMarkerDisplay(true);
setY1LabelDisplay(false);
setO1LabelDisplay(false);
setO1AxisSide(0);
setO1MajorGridDisplay(true);
setO1MajorGridStyle(0);
setO1MinorGridDisplay(false);
setAxisAssignment(0,0);
setSeriesType(0,3);
setAxisAssignment(1,0);
setSeriesType(1,3);
setAxisAssignment(2,0);
setSeriesType(2,3);
setAxisAssignment(3,0);
setSeriesType(3,2);
setY1LabelDisplay(false);
setY1AxisSide(0);
setY1MajorGridDisplay(true);
setY1MinorGridDisplay(false);
setSeriesDefaultTransparentBorderColor(true);
setUseSeriesBorderDefaults(true);
setLegendDisplay(false);
setFontSizeAbsolute(getY1Title(),true);
setPlace(false);
setGridStepAuto(getY1MajorGrid(),false);
setGridStep(getY1MajorGrid(),10.0);
setTextRotation(getO1Label(),0);
setDisplay(getY1Title(),false);
setDisplay(getO1Title(),flase);
setDisplay(getLegendArea(),false);
setMarkerSize(getSeries(0),0);
setMarkerSize(getSeries(1),0);
setMarkerSize(getSeries(2),0);
setMarkerSize(getSeries(3),50);
setFillColor(getSeries(3),new Color(0,0,0));
setMarkerShape(getSeries(3),6);
ENDSTYLE
ON GRAPH SET STYLE *
PAGESIZE='Letter',
LEFTMARGIN=0.250000,
RIGHTMARGIN=0.250000,
TOPMARGIN=0.250000,
BOTTOMMARGIN=0.250000,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
GRID=OFF,
FONT='TIMES NEW ROMAN',
SIZE=10,
BACKCOLOR='NONE',
STYLE=NORMAL,
$
TYPE=DATA,
ACROSSCOLUMN=N1,
COLOR='RED',
$
TYPE=DATA,
ACROSSCOLUMN=N2,
COLOR='YELLOW',
$
TYPE=DATA,
ACROSSCOLUMN=N3,
COLOR='GREEN',
$
ENDSTYLE
END
-* change to your location (Note in 7.6.9, dev studio at least, any directory other than \ibi_html\javaassist\images does not work)
-RUN
!DEL C:\ibi\DevStudio76\ibi_html\javaassist\images\&GRAPH.EVAL.jpg
-RUN
!COPY /Y &GRAPH.EVAL.jpg C:\ibi\DevStudio76\ibi_html\javaassist\images\&GRAPH.EVAL.jpg
-RUN
DEFINE FILE CAR
NUMBER1/I1= IF COUNTRY EQ 'ENGLAND' THEN 10 ELSE IF COUNTRY EQ 'JAPAN' THEN 20 ELSE IF COUNTRY EQ 'USA' THEN 30 ELSE 40;
NUMBER2/I1= IF COUNTRY EQ 'ENGLAND' THEN 20 ELSE IF COUNTRY EQ 'JAPAN' THEN 40 ELSE IF COUNTRY EQ 'USA' THEN 60 ELSE 80;
END
GRAPH FILE CAR
-* Created by Advanced Graph Assistant
PRINT NUMBER1
BY NUMBER2
ON GRAPH PCHOLD AS HOLD FORMAT PNG
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF
ON GRAPH SET VZERO ON
ON GRAPH SET GRID ON
ON GRAPH SET HAXIS 770
ON GRAPH SET VAXIS 405
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH SCATTERS
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET GRAPHSTYLE *
setReportParsingErrors(false);
setSelectionEnableMove(false);
setMarkerDisplay(true);
setConnectLineMarkers(false);
setConnectScatterMarkers(false);
setO1LabelDisplay(true);
setO1AxisSide(0);
setO1MajorGridDisplay(true);
setO1MajorGridStyle(0);
setO1MinorGridDisplay(false);
setAxisAssignment(0,0);
setY1LabelDisplay(true);
setY1AxisSide(0);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
setTextFormatPreset(getY1Label(),-1);
setTextFormatPattern(getY1Label(),"#.##");
setTextFormatPreset(getPieSliceLabel(),1);
setRiserBorderMode(1);
setSeriesDefaultTransparentBorderColor(true);
setUseSeriesBorderDefaults(true);
setLegendDisplay(true);
setFontSizeAbsolute(getY1Title(),true);
setFontSizeAbsolute(getY1Label(),true);
setFontSizeAbsolute(getY2Title(),true);
setFontSizeAbsolute(getY2Label(),true);
setFontSizeAbsolute(getO1Title(),true);
setPlace(false);
setScaleMaxAuto(getX1Axis(),false);
setScaleMaxAuto(getY1Axis(),false);
setScaleMax(getY1Axis(),100.0);
setGridStepAuto(getY1MajorGrid(),false);
setGridStep(getY1MajorGrid(),10.0);
setGridStepAuto(getX1MajorGrid(),false);
setGridStep(getX1MajorGrid(),10.0);
setFrameDisplay(false);
setFillType(getChartBackground(),3);
setTextureURL(getChartBackground(),"/images/&GRAPH.EVAL.jpg");
ENDSTYLE
ON GRAPH SET STYLE *
TYPE=REPORT, ORIENTATION=PORTRAIT, SQUEEZE=ON, $
TYPE=REPORT, FONT='TIMES NEW ROMAN', SIZE=10, GRID=OFF, $
ENDSTYLE
END
This message has been edited. Last edited by: <JG>,
If I understand you correctly then I did this using a variation of what you started with and added some HTMLTABLE / HTMLFORM code to produce THIS. This was completed using the basic code, as follows:
GRAPH FILE X
...
ON GRAPH SET HAXIS 900
ON GRAPH SET VAXIS 600
ON GRAPH HOLD AS GRAPH1 FORMAT HTMTABLE
...
END
GRAPH FILE Y
...
ON GRAPH SET HAXIS 600
ON GRAPH SET VAXIS 400
ON GRAPH HOLD AS GRAPH2 FORMAT HTMTABLE
...
END
-HTMLFORM BEGIN
...
-HTMLFORM END
-TheEnd
GRAPH1 is your background and GRAPH2 is your foreground. You'll need to play around with the sizing, positions, titles, etc...
In FOCUS Since 1983 ~ from FOCUS to WebFOCUS. Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005
OK JG, Thanks for the clarification... I got confused... So, Anatess, what I produced would be good IF the second graph (the grid) was transparent and the correct size for a proper overlay, right? If not, please provide a sample.
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005
Actually, there is a technique to do this that I got from Summit 09. I've used it back in Nationwide as well. That is, do not use a an area chart and a scatter chart. But, rather use an area chart and a line graph. The line chart has the line connection off and the line size set to one. I'll work on it and pass it along.
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005
Thanks again JG. I continued on past your post of "Sat Jun 13 2009 03:53" for three reasons: 1) Anatess never replied as to that was what she wanted... 2) I did not get the same results as you did when I ran your code. I am running 764 on Windows. 3) I wanted to do this with only one graph.
Thanks again. Your insight has been exceptional and much appreciated. I'm outta here... Case [solved]?
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005