Focal Point
[Sharing] New HTML5 Extension

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

June 19, 2019, 06:38 AM
Tony A
[Sharing] New HTML5 Extension
For those of you who attended my session at Summit, I promised the publishing of the extension that we saw - com.ibi.divergent.

This is now available on the GitHub site https://github.com/ibi/wf-exte...er/com.ibi.divergent with the additions that we covered during the session.

This took a little longer than intended owing to request to add the chart header (title) and positioning of the legend (top or bottom only) - controlled from GUI options.

If you have any feedback, please provide this via GitHub only. Thank you.

T

This message has been edited. Last edited by: Tony A,



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.06 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
June 19, 2019, 12:42 PM
Hallway
Good One

I wish I could have been at Summit to attend your session. Thanks for the new extension.


Hallway
WF(Prod):8202M
WF(Test):8202M
OS/Platform:Win 10
Outputs:All
June 19, 2019, 03:17 PM
Waz
Ditto with Summit.

Excellent job, chart examples look fantastic.

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


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.06OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

June 20, 2019, 02:46 AM
Tony A
Thanks Gents, it would have been great to see you at Summit but I understand your restrictions.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.06 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
June 20, 2019, 05:54 AM
Tony A
Incidentally, the DyGraph extension has recently had more properties added so it might be worth installing the recent update.


T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.06 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
June 26, 2019, 02:45 PM
Aswin Ravikumar
Hi Tony,

Thanks for the extension. I am going to currently fork it to just accepts 3 since that how i want for my survey . Btw did you have find way to send to drill separate reports for separate measures. Webfocus extension seems to have a limitation where it considers all the measure as the same series .


Thanks,
Aswin Ravikumar


Webfocus 8.1
Windows x64
Excel
June 27, 2019, 03:22 AM
Tony A
Aswin,

The donor code was from the same chart type on D3js.org and, if you had been at my session in Orlando, you would have heard me say that the same series was intended - I wanted to demonstrate the limitation having them in one series and trying to assign more than one colour.

As for having to fork it to your own needs, be my guest, but I would be inclined to firstly see if making the first and fifth replies as zero, changing their titles to blanks and the colours to white or even try transparent (using rgba).

I have just tried the latter and it works fine - it will save you having to mess with a fork!

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.06 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
June 27, 2019, 03:45 AM
Tony A
Hmmm, just noticed that your signature states 8.1 - I do hope that is wrong and that you haven't updated it!! Confused

Anyway, using my sample data,

GRAPH FILE likert_data
SUM COMPUTE DUMMY1/D12.2 MISSING ON =0; AS ' '
LIKERT_DATA.SEG01.STRONGDISAGREE AS 'Disagree'
LIKERT_DATA.SEG01.NEITHER AS 'Neutral'
LIKERT_DATA.SEG01.STRONGAGREE AS 'Agree'
COMPUTE DUMMY2/D12.2 MISSING ON =0; AS ' '
BY LIKERT_DATA.SEG01.Q_NUM NOPRINT
BY LIKERT_DATA.SEG01.QUESTION
WHERE LIKERT_DATA.SEG01.SOURCE EQ 'Sample 2';
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET GRWIDTH 1
ON GRAPH SET LOOKGRAPH EXTENSION
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0); 
setPlace(true); 
setCurveFitEquationDisplay(false); 
*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
TYPE=REPORT, PAGESIZE=A4, $
TYPE=DATA, COLUMN=N1, BUCKET= >Question, $
TYPE=DATA, COLUMN=N2, BUCKET= >Question, $
TYPE=DATA, COLUMN=N3, BUCKET= >replies, $
TYPE=DATA, COLUMN=N4, BUCKET= >replies, $
TYPE=DATA, COLUMN=N5, BUCKET= >replies, $
TYPE=DATA, COLUMN=N6, BUCKET= >replies, $
TYPE=DATA, COLUMN=N7, BUCKET= >replies, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
*GRAPH_JS_FINAL
"extensions": {
    "com.ibi.divergent": {
        "useSeriesColours": false,
        "colors": ["rgba(255,255,255,0)", "#f6a580", "#cccccc", "#92c6db", "#ffffff"]
    }
},
"pieProperties": {
    "holeSize": "0%"
},
"chartType": "com.ibi.divergent",
"agnosticSettings": {
    "chartTypeFullName": "com.ibi.divergent"
}
*END
ENDSTYLE
END


T

This message has been edited. Last edited by: Tony A,



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.06 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
June 27, 2019, 08:45 AM
Doug
Thanks Tony,

I was at that sessions and it was excellent!

I knew that We Can Do That in WebFOCUS!

Doug


   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Most recent: 8204 Gen 48 in Test and Production.
June 27, 2019, 09:56 AM
Aswin Ravikumar
quote:
Originally posted by Tony A:
Hmmm, just noticed that your signature states 8.1 - I do hope that is wrong and that you haven't updated it!! Confused

We are still in the migration phase where generate excel from 8105 and dashboards/charts from 8205. Wink

GRAPH FILE likert_data
SUM COMPUTE DUMMY1/D12.2 MISSING ON =0; AS ' '
LIKERT_DATA.SEG01.STRONGDISAGREE AS 'Disagree'
LIKERT_DATA.SEG01.NEITHER AS 'Neutral'
LIKERT_DATA.SEG01.STRONGAGREE AS 'Agree'
COMPUTE DUMMY2/D12.2 MISSING ON =0; AS ' '
BY LIKERT_DATA.SEG01.Q_NUM NOPRINT
BY LIKERT_DATA.SEG01.QUESTION
WHERE LIKERT_DATA.SEG01.SOURCE EQ 'Sample 2';
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET GRWIDTH 1
ON GRAPH SET LOOKGRAPH EXTENSION
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0); 
setPlace(true); 
setCurveFitEquationDisplay(false); 
*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
TYPE=REPORT, PAGESIZE=A4, $
TYPE=DATA, COLUMN=N1, BUCKET= >Question, $
TYPE=DATA, COLUMN=N2, BUCKET= >Question, $
TYPE=DATA, COLUMN=N3, BUCKET= >replies, $
TYPE=DATA, COLUMN=N4, BUCKET= >replies, $
TYPE=DATA, COLUMN=N5, BUCKET= >replies, $
TYPE=DATA, COLUMN=N6, BUCKET= >replies, $
TYPE=DATA, COLUMN=N7, BUCKET= >replies, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
*GRAPH_JS_FINAL
"extensions": {
    "com.ibi.divergent": {
        "useSeriesColours": false,
        "colors": ["rgba(255,255,255,0)", "#f6a580", "#cccccc", "#92c6db", "#ffffff"]
    }
},
"pieProperties": {
    "holeSize": "0%"
},
"chartType": "com.ibi.divergent",
"agnosticSettings": {
    "chartTypeFullName": "com.ibi.divergent"
}
*END
ENDSTYLE
END


Thanks for the code Tony. It works the way i wanted. I couldn't attend summit this year, but is there any way we could get around with the single series limitation ? . I build a versions of KPI charts where it accepts multiple rows of supporting measures ( Sample Image ) . Users wants to click on each measure to get different report outputs based on the measure they click and I can only provide one drill for the entire kpi.

Wish we had a proper documentation on moonbeans api.

Thanks,
Aswin Ravikumar


Webfocus 8.1
Windows x64
Excel
June 27, 2019, 11:04 AM
Tony A
Hi Aswin,

If I read your response correctly, you have 2 questions/requests -



If I have those correct then then first would require some thought and effort. What is your specific issue with only 1 bucket?

The second would need knowledge of the KPI extension that you are using (also, which one did you start with - I am guessing kpi_table?).

Neither of these are something that my current / upcoming work duties allow me Frowner

I did add drilldown potential to com.ibi.dendrorag which is configurable within the properties.json file. You could use that as an example to derive how you need to extend your code. It should not be too onerous (I think) as the KPI_table extension essentially creates an HTML table.

Good luck

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.06 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
June 27, 2019, 11:28 AM
Aswin Ravikumar
quote:

  • Modification of Divergent to have 5 individual "reply" buckets rather than just the 1 it has been built with.
  • How-to add drilldown links into your version of the KPI extension.


Yes i used the KPI Table to create this extension and I am actually good with having just one bucket.I am able to create drill down in my extension but not able to have different drills for different measures, i.e I am not able pass which measure i clicked in an parameter to the targeted report.

Thanks,
Aswin Ravikumar


Webfocus 8.1
Windows x64
Excel
June 27, 2019, 11:38 AM
Tony A
Can you send me a link to download your extension zip file?

If so then please Send it via PM only

T



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