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] Pie Graph Multi - Customization

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Pie Graph Multi - Customization
 Login/Join
 
Platinum Member
posted
Hello

I am working on Pie graph multi and I am not able to customize it. Is there a way to display these pies in specific number of rows and columns?
And I am trying to have legend only once instead of all graphs. Is that possible? I searched forum but not able to find much on multi pie graphs.
ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
SET HTMLENCODE=ON
SET ARGRAPHENGINE=JSCHART
SET EMBEDHEADING=ON
SET GRAPHDEFAULT=OFF
-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='405.0';
-DEFAULTH &WF_STYLE_WIDTH='770.0';
-DEFAULTH &WF_TITLE='WebFOCUS Report';
GRAPH FILE car
-* Created by Info Assist for Graph
SUM CAR.BODY.SALES
BY CAR.ORIGIN.COUNTRY NOPRINT
BY CAR.ORIGIN.COUNTRY
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET GRWIDTH 1
ON GRAPH SET AUTOFIT ON
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 PIE
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setPieFeelerTextDisplay(1);
setPlace(true);
setCurveFitEquationDisplay(false);
*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, PAGESIZE=LEGAL, $
TYPE=DATA, COLUMN=N1, BUCKET=page, $
TYPE=DATA, COLUMN=N2, BUCKET=color, $
TYPE=DATA, COLUMN=N3, BUCKET=measure, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
*GRAPH_JS_FINAL
"pieProperties": {
    "holeSize": "0%"
},
"agnosticSettings": {
    "chartTypeFullName": "Pie_Multi"
}
*END
ENDSTYLE
END
-RUN

-*IA_GRAPH_FINISH  


Please suggest. Thank you.

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


WebFOCUS 8206
All formats
 
Posts: 95 | Registered: September 13, 2017Report This Post
Virtuoso
posted Hide Post
Changing the
ON GRAPH SET GRWIDTH 1

from 1 to any other value will generates as many pie side by side as the number you put but each graph will have its own legend since it may vary from one to another
ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
SET HTMLENCODE=ON
SET ARGRAPHENGINE=JSCHART
SET EMBEDHEADING=ON
SET GRAPHDEFAULT=OFF
-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='405.0';
-DEFAULTH &WF_STYLE_WIDTH='770.0';
-DEFAULTH &WF_TITLE='WebFOCUS Report';
GRAPH FILE car
SUM RETAIL_COST
BY CAR.ORIGIN.COUNTRY NOPRINT
BY CAR
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET GRWIDTH 2
ON GRAPH SET AUTOFIT ON
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 PIE
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setPieFeelerTextDisplay(1);
setPlace(true);
setCurveFitEquationDisplay(false);
*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, PAGESIZE=LEGAL, $
TYPE=DATA, COLUMN=N1, BUCKET=page, $
TYPE=DATA, COLUMN=N2, BUCKET=color, $
TYPE=DATA, COLUMN=N3, BUCKET=measure, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
*GRAPH_JS_FINAL
"pieProperties": {
    "holeSize": "0%"
},
"agnosticSettings": {
    "chartTypeFullName": "Pie_Multi"
}
*END[code
ENDSTYLE
END
-RUN

One way to have one legend displayed, I suggest that you hide all legend from the graph and add another report that just contain and display the legend (such as only display HEADING with appropriated colors).
The problem is that you need to be sure that each series is always in the same order on any pie which can be a nightmare. But work great with Year or something that will not vary.

Pie Graph
ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
SET HTMLENCODE=ON
SET ARGRAPHENGINE=JSCHART
SET EMBEDHEADING=ON
SET GRAPHDEFAULT=OFF
-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='200.0';
-DEFAULTH &WF_STYLE_WIDTH='300.0';
-DEFAULTH &WF_TITLE='WebFOCUS Report';
DEFINE FILE GGSALES
YEAR /YY = DATE;
END
GRAPH FILE GGSALES
SUM DOLLARS
BY REGION NOPRINT
BY YEAR
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET GRWIDTH 2
ON GRAPH SET AUTOFIT ON
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 PIE
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setPieFeelerTextDisplay(1);
setPlace(true);
setCurveFitEquationDisplay(false);
*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, PAGESIZE=LEGAL, $
TYPE=DATA, COLUMN=N1, BUCKET=page, $
TYPE=DATA, COLUMN=N2, BUCKET=color, $
TYPE=DATA, COLUMN=N3, BUCKET=measure, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);

-* To hide the legend
setDisplay(getLegendArea(),false);

-* To specify series color
setTransparentBorderColor(getSeries(0), true);
setFillColor(getSeries(0),new Color(128,128,128));
setTransparentBorderColor(getSeries(1), true);
setFillColor(getSeries(1),new Color(255,128,64));
*GRAPH_JS_FINAL
"pieProperties": {
    "holeSize": "0%"
},
"agnosticSettings": {
    "chartTypeFullName": "Pie_Multi"
}
*END
ENDSTYLE
END
-RUN

Legend Report
DEFINE FILE GGSALES
YEAR /YY = DATE;
END
GRAPH FILE GGSALES
BY YEAR
ON TABLE HOLD AS YRDATA
END
-RUN
-DEFAULTH &I = 0
-REPEAT READYR &LINES TIMES
-SET &I = &I + 1;
-READFILE YRDATA
-SET &YR&I.EVAL = &YEAR;
-TYPE &YR&I.EVAL
-RUN
-READYR

TABLE FILE CAR
BY COUNTRY NOPRINT
WHERE READLIMIT   EQ 1;
WHERE RECORDLIMIT EQ 1;
HEADING
"  &YR1  "
"  &YR2  "

ON TABLE SET PAGE-NUM NOLEAD
ON TABLE PCHOLD FORMAT HTML
ON TABLE NOTOTAL
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=REPORT,
  BORDER=OFF,
$
TYPE=HEADING,
  LINE=1,
  STYLE=BOLD,
  COLOR=WHITE,
  BACKCOLOR=RGB(128 128 128),
$
TYPE=HEADING,
  LINE=2,
  STYLE=BOLD,
  COLOR=WHITE,
  BACKCOLOR=RGB(255 128 64),
$
END
-RUN


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Platinum Member
posted Hide Post
Thanks Martin. These suggestions worked well for me. I did my other customization works and no issues.
Finally when I try to insert this in iframe, it displays in large size with scrolls. I tried working with iframe properties but did not see anything that helped.

Please try inserting this in iframe with height 350px and width 650 px. Whatever the iframe size is, I see only 1st pie displaying in it and all other pies will show only when scrolled. But if I display it in new window instead of iframe, they show up well in size as specified.
ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
SET HTMLENCODE=ON
SET ARGRAPHENGINE=JSCHART
SET EMBEDHEADING=ON
SET GRAPHDEFAULT=OFF
-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='150.0';
-DEFAULTH &WF_STYLE_WIDTH='200.0';
-DEFAULTH &WF_TITLE='WebFOCUS Report';
GRAPH FILE car
-* Created by Info Assist for Graph
SUM CAR.BODY.SALES
BY CAR.ORIGIN.COUNTRY NOPRINT
BY CAR.ORIGIN.COUNTRY
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET GRWIDTH 3
ON GRAPH SET AUTOFIT ON
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 PIE
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setPieFeelerTextDisplay(1);
setPlace(true);
setCurveFitEquationDisplay(false);
*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, PAGESIZE=LEGAL, $
TYPE=DATA, COLUMN=N1, BUCKET=page, $
TYPE=DATA, COLUMN=N2, BUCKET=color, $
TYPE=DATA, COLUMN=N3, BUCKET=measure, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
setDisplay(getLegendArea(),false);
setPieSliceDetach(getSeries(*), 75);
*GRAPH_JS_FINAL
"pieProperties": {
    "holeSize": "0%"
},
"agnosticSettings": {
    "chartTypeFullName": "Pie_Multi"
}
*END
ENDSTYLE
END


WebFOCUS 8206
All formats
 
Posts: 95 | Registered: September 13, 2017Report This Post
Virtuoso
posted Hide Post
Add this :
-SET &WF_STYLE_UNITS='PIXELS';
-SET &WF_STYLE_HEIGHT='150.0';
-SET &WF_STYLE_WIDTH='200.0';

I don't know why but if you only keep the size as DEFAULTH values, the graph engine is not "reading" them and display as if you have one graph per row and filed all the available space

I already encounter the same issue and got the "solution" from a case that I had open.
Took me a will to remember that "little" thing and share to you


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Platinum Member
posted Hide Post
Thank you so much. That worked.
quote:
Originally posted by MartinY:
Add this :
-SET &WF_STYLE_UNITS='PIXELS';
-SET &WF_STYLE_HEIGHT='150.0';
-SET &WF_STYLE_WIDTH='200.0';

I don't know why but if you only keep the size as DEFAULTH values, the graph engine is not "reading" them and display as if you have one graph per row and filed all the available space

I already encounter the same issue and got the "solution" from a case that I had open.
Took me a will to remember that "little" thing and share to you


WebFOCUS 8206
All formats
 
Posts: 95 | Registered: September 13, 2017Report 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] Pie Graph Multi - Customization

Copyright © 1996-2020 Information Builders