Focal Point
[SOLVED] Pie within a Pie

This topic can be found at:
http://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/1797082786

July 20, 2017, 09:47 AM
Shingles
[SOLVED] Pie within a Pie
Hello Everyone,

This is a great community BTW, you folks are so helpful... thank you!

I would like to create a pie within a pie, or at least that's what I call it. I'd like to create something like this. As you can see, each pie segement is further broken down by an outter ring (which represents the gender).

I think this should be easy to do. All that needs to be done is show two pies of varying sizes, but they need to be drawn on top of each other. Is there a way to specify where the pies are placed on an HTML page? I have to think this is possible.

EDIT: If I take this approach I will have to sort the pies according to another field. I have to think that I can sort the pies by a hidden (NOPRINT) field, but I am getting errors when I try. I've included the SUM and BY clauses below. If I uncomment that commented field I get a NaN error.

SUM
COMPUTE NOP/I7 = CNT.DST.COL1; AS 'Number of People'
-*BY COL2
BY HIGHEST NOP NOPRINT
BY COL3

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8201, SP 0.1, Windows 7, HTML
July 20, 2017, 10:20 AM
FP Mod Chuck
Hi Shingles

Yes it is possible by taking advantage of D3 type charts which can be refereneced by WebFOCUS.

I believe your example is a bi-level partition

https://d3js.org/


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
July 20, 2017, 10:29 AM
Shingles
Thanks for the reply Chuck. I love D3 charts. I haven't had a chance to use them yet. I'll do a little homework before asking anymore follow up questions.

Thank you!


WebFOCUS 8201, SP 0.1, Windows 7, HTML
July 20, 2017, 10:45 AM
BabakNYC
If you have the D3 extensions configured here's an example of what you're looking for:

ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
SET HTMLENCODE=OFF
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 ibisamp/car
-* Created by Info Assist for Graph
SUM CAR.BODY.DEALER_COST
BY CAR.ORIGIN.COUNTRY
BY CAR.COMP.CAR
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET GRWIDTH 1
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 EXTENSION
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/ibi_themes/Warm.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, ORIENTATION=LANDSCAPE, $
TYPE=DATA, COLUMN=N1, BUCKET= >levels, $
TYPE=DATA, COLUMN=N2, BUCKET= >levels, $
TYPE=DATA, COLUMN=N3, BUCKET= >value, $
*GRAPH_SCRIPT

setReportParsingErrors(false);
setSelectionEnableMove(false);
*GRAPH_JS_FINAL
"pieProperties": {
"holeSize": "0%"
},
"chartType": "com.ibi.sunburst",
"agnosticSettings": {
"chartTypeFullName": "com.ibi.sunburst"
}

*END
ENDSTYLE
END

-RUN





WebFOCUS 8206, Unix, Windows
July 20, 2017, 12:02 PM
Shingles
This page is telling me to use V3, but it is not the latest. Should I use the latest or version 3?

Thank you


WebFOCUS 8201, SP 0.1, Windows 7, HTML
July 20, 2017, 12:18 PM
BabakNYC
That's from 2013. I'd use the latest from here:
https://github.com/ibi/wf-extensions-chart


WebFOCUS 8206, Unix, Windows
July 20, 2017, 04:11 PM
Shingles
quote:
Originally posted by BabakNYC:
That's from 2013. I'd use the latest from here:
https://github.com/ibi/wf-extensions-chart


Thanks alot, that's perfect. That was very easy to implement.


WebFOCUS 8201, SP 0.1, Windows 7, HTML
July 21, 2017, 09:30 AM
Shingles
So I'm trying to customize some of the settings and I'm not too successful. I'm trying to use a colour scheme that I like. I've modified the properties.json file as is described here. I tried to refresh the cache via the Administration console. I also tried to restart AppStudio. But looks like I'm still getting the default colours.

And ya... I'm Canadian so I spell it "colours"!

So how do I change the colours?

Thank you


WebFOCUS 8201, SP 0.1, Windows 7, HTML
July 21, 2017, 09:47 AM
FP Mod Chuck
Shingles

I would clear your actual browser cache.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
August 16, 2017, 01:54 PM
Shingles
Turns out it was using a cached copy of the properties.json file. Flushing the cache (and I tried doing this several ways) didn't seem to do it. I had to go to my C:\Users\\AppData\Local\Microsoft\Temporary Internet Files folder and delete the file there. I'm using IE 11 btw.


WebFOCUS 8201, SP 0.1, Windows 7, HTML
August 17, 2017, 04:23 AM
Tony A
quote:
so I spell it "colours"!


Big GrinBig GrinBig GrinBig GrinBig Grin

Glad to have someone else in that camp Wink

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10