Focal Point
[CLOSED] How to print a graph (developed using JSCHART format) in a PDF

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

November 09, 2017, 12:21 PM
jfr99
[CLOSED] How to print a graph (developed using JSCHART format) in a PDF
Hi All,

How do you print a chart that is developed using the JSCHART format into a PDF document? Without making many changes to the existing JSCHART code.

Here is an example of a pie chart. Can this be saved as a .gif (or something other) that can then be imbedded into a PDF document?

GRAPH FILE CAR
SUM DEALER_COST AS 'Dealer Cost'
BY HIGHEST TOTAL DEALER_COST NOPRINT
BY COUNTRY AS 'Country'
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET LOOKGRAPH PIE
ON GRAPH SET STYLE *
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
TYPE=DATA, COLUMN=N1, BUCKET=color, $
TYPE=DATA, COLUMN=N2, BUCKET=color, $
TYPE=DATA, COLUMN=N3, BUCKET=measure, $
*GRAPH_SCRIPT
setPieFeelerTextDisplay(1);
setPieLabelDisplay(6);
*END
*GRAPH_JS_FINAL
"legend": {
  "position": 'bottom',
  "title": {visible: false}
},
"pieProperties": {
  "label": {visible: false},
  "totalLabel": { visible: true},
  "holeSize": "50%",
}
*END
ENDSTYLE
END

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


WebFocus 8.201M, Windows, App Studio
November 09, 2017, 01:36 PM
Tony A
You can try using PhantomJS to do this.

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 
November 09, 2017, 03:04 PM
Waz
quote:
PhantomJS


Ditto to that.

I think it may be the only way.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

November 10, 2017, 05:21 AM
Tulsi
In current webfocus version , pdf compound document dnt support jschars. however you can achieve almost same chart in pdf format in InfoAssist+ . Use this chart codes in your pdf compound, i hope it will work.

GRAPH FILE car
-* Created by Info Assist for Graph
SUM CAR.SPECS.BHP
BY CAR.ORIGIN.COUNTRY
ON GRAPH PCHOLD FORMAT PDF
ON GRAPH SET VZERO OFF
ON GRAPH SET GRWIDTH 1
ON GRAPH SET HAXIS 5.0
ON GRAPH SET VAXIS 3.5
ON GRAPH SET UNITS INCHES
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 1
ON GRAPH SET GRXAXIS 0
ON GRAPH SET LOOKGRAPH PIEMULTR
ON GRAPH SET STYLE *
*GRAPH_SCRIPT

setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
setPieFeelerTextDisplay(1);

*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
TYPE=REPORT, TITLETEXT='Chart1', ORIENTATION=LANDSCAPE, $
*GRAPH_SCRIPT

setReportParsingErrors(false);
setSelectionEnableMove(false);
*GRAPH_JS_FINAL
"pieProperties": {
"holeSize": "65%"
},
"agnosticSettings": {
"chartTypeFullName": "Pie_Multi_Ring"
}

*END
ENDSTYLE
END


webfcous 8202m
windows 7