I am trying to create an image WITH a bullet chart type (gif, png or jpeg) using:
ON GRAPH HOLD AS 'xbullet' FORMAT GIF
The image created is very different than HTML version (to obtain HTML version, remove the line above in the code below). Have I done something wrong?
See my CAR code below.
Could anyone help?
-************************DATA SETUP DEFINE FILE CAR COST_TYPE/A10='1'; COST/D12.2=DEALER_COST; END TABLE FILE CAR PRINT COST_TYPE CAR MODEL COST ON TABLE HOLD AS DEALER_INFO END
DEFINE FILE CAR COST_TYPE/A10='0'; COST/D12.2=RETAIL_COST; END TABLE FILE CAR PRINT COST_TYPE CAR MODEL COST ON TABLE HOLD AS RETAIL_INFO END
TABLE FILE RETAIL_INFO PRINT COST_TYPE CAR MODEL COST ON TABLE HOLD AS GRAPH_INFO MORE FILE DEALER_INFO END
-************************GRAPH ENGINE INT CACHE SET ON
GRAPH FILE GRAPH_INFO SUM COST BY COST_TYPE WHERE MODEL EQ 'XJ12L AUTO'; ON GRAPH SET VAXIS 80 ON GRAPH PCHOLD FORMAT JSCHART ON GRAPH SET VZERO OFF -*ON GRAPH SET HTMLENCODE ON ON GRAPH SET GRAPHDEFAULT OFF 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 CUSTOM -********************************************** ON GRAPH HOLD AS '_bullet' FORMAT GIF -********************************************** ON GRAPH SET STYLE * *GRAPH_JS chartType: 'bullet', bulletProperties: {drawFirstValueAsBar: true}, border: {width: 0}, dataLabels: {visible: true, color: 'black', font: '10pt'}, series: [ {series: 'all', showDataValues: true}, {series: 0, group: 0, color: 'steelblue', marker: {size: 15, position: 'middle'}}, {series: 0, group: 1, color: 'red', marker: {size: 15, position: 'middle'}}, ] *END INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/ENIADefault_combine.sty,$ ENDSTYLE ENDThis message has been edited. Last edited by: FP Mod Chuck,
WebFOCUS 8.0.9 Windows, All Outputs
August 07, 2017, 05:47 PM
Waz
The reason why your saved image is different is that you have GRAPH_JS code that is not used in charts saved as an image.
If you need to match the look, you will need to add in non GRAPH_JS commands. please see WebFOCUS Charting. (Not sure what its called in v7.7)
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
August 08, 2017, 04:08 PM
Luco
I remember now I have to use non GRAPH_JS code. Thank you.