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 am working on a graph report. I have a problem with the display of legend . Able to display legend for multiple values but not able to display for single value. Ex:
I am plotting a graph using one numeric field & one alphanumeric across a month field. Whenever there are multiple months in the data It is displaying Legend for all the months presented. But if I have only one month it is not displaying the legend.
I am copying the sample code here (developed using CAR master file). Please check the code once and let me know if u get any clue.
-**************************** -* File testcar.fex GRAPH FILE CAR SUM DEALER_COST AS '' ACROSS MODEL BY COUNTRY WHERE COUNTRY EQ 'ITALY' -* try also commenting above condition 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 SET GRWIDTH 0 ON GRAPH SET GRMERGE ON ON GRAPH PCHOLD FORMAT PNG ON GRAPH SET GRAPHSTYLE * setMarkerDisplay(true); setConnectLineMarkers(false); setConnectScatterMarkers(false); setO1LabelDisplay(true); setO1AxisSide(0); setO1MajorGridDisplay(true); setO1MajorGridStyle(0); setO1MinorGridDisplay(false); setAxisAssignment(0,0); setSeriesType(0,3); 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); 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=HEADING, LINE=1, OBJECT=FIELD, ITEM=1, COLOR='BLACK', $ ENDSTYLE END
-**************************** Please let me know the solution ASAP
Thanks & Regards Amarnath.kThis message has been edited. Last edited by: Kerry,
I tried the code in version 7.13, and the Legend exists ( a little blue square below the x-axis title), but it is not labelled (you would expect the label of "ITALY").
SUM DEALER_COST AS '' ACROSS MODEL BY COUNTRY WHERE COUNTRY EQ '&COUNTRY'
-* try also commenting above condition 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 SET GRWIDTH 0 ON GRAPH SET GRMERGE ON ON GRAPH PCHOLD FORMAT PNG ON GRAPH SET GRAPHSTYLE * setMarkerDisplay(true); setConnectLineMarkers(false); setConnectScatterMarkers(false); setO1LabelDisplay(true); setO1AxisSide(0); setO1MajorGridDisplay(true); setO1MajorGridStyle(0); setO1MinorGridDisplay(false); setAxisAssignment(0,0); setSeriesType(0,3); 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);
-IF &VARCTR NE 1 GOTO SKIP_ANNOT; setDisplay(getAnnotation(0), true); setTextString(getAnnotation(0), "&COUNTRY"); setRect(getAnnotation(0),new Rectangle(500,-14850,1500,100)); setFillColor(getAnnotation(0), new Color(0,0,0)); -SKIP_ANNOT
setFontSizeAbsolute(getY1Title(),true); setFontSizeAbsolute(getY1Label(),true); setFontSizeAbsolute(getY2Title(),true); setFontSizeAbsolute(getY2Label(),true); setFontSizeAbsolute(getO1Title(),true); setPlace(true); 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=HEADING, LINE=1, OBJECT=FIELD, ITEM=1, COLOR='BLACK', $ ENDSTYLE END
ttfn, kp
Access to most releases from R52x, on multiple platforms.
Posts: 346 | Location: Melbourne Australia | Registered: April 15, 2003
Is there another solution to this? I don't think this work around is going to work for me. Why would it not display the Legend Display if it's one value? This makes no sense. If it's only one value...you just should know what it is?
In Focus since 1993. WebFOCUS 7.7.03 Win 2003
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005
Can you tell you which release you are seeing this issue in? I ran your code in both WF 7.6.9 and 7.6.10 releases and saw the legend appear on the chart.
Prarie, I have done an internal search and unfortunately it's a known bug supposedly fixed in 7.6.5, have you tried it on your 7.6.5 test environment.
It does work in 7.6.6 and above.
One possible solution that I saw was instead of coding ON GRAPH SET LOOKGRAPH VAREA explicitly set the graph type using the API call e.g. setGraphType(31);
JG, that's an excellent idea. I actually tried it in Release 7.6.1 and it worked. I modified the original fex to show a working example.
-DEFAULT &VARCTR = 1 -DEFAULT &COUNTRY = 'ITALY'
GRAPH FILE CAR
SUM DEALER_COST AS '' ACROSS MODEL BY COUNTRY WHERE COUNTRY EQ '&COUNTRY'
-* try also commenting above condition -*VLozovsky: changed VAREA to VLINE ON GRAPH SET LOOKGRAPH VLINE 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 SET GRWIDTH 0 ON GRAPH SET GRMERGE ON ON GRAPH PCHOLD FORMAT PNG ON GRAPH SET GRAPHSTYLE * setMarkerDisplay(true); setConnectLineMarkers(false); setConnectScatterMarkers(false); setO1LabelDisplay(true); setO1AxisSide(0); setO1MajorGridDisplay(true); setO1MajorGridStyle(0); setO1MinorGridDisplay(false); setAxisAssignment(0,0); -*VLozovsky: api call below will visualize the line chart as an area setSeriesType(0,3); 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);
-IF &VARCTR NE 1 GOTO SKIP_ANNOT; setDisplay(getAnnotation(0), true); setTextString(getAnnotation(0), "&COUNTRY"); setRect(getAnnotation(0),new Rectangle(500,-14850,1500,100)); setFillColor(getAnnotation(0), new Color(0,0,0)); -SKIP_ANNOT
setFontSizeAbsolute(getY1Title(),true); setFontSizeAbsolute(getY1Label(),true); setFontSizeAbsolute(getY2Title(),true); setFontSizeAbsolute(getY2Label(),true); setFontSizeAbsolute(getO1Title(),true); setPlace(true); 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=HEADING, LINE=1, OBJECT=FIELD, ITEM=1, COLOR='BLACK', $ ENDSTYLE END