Focal Point
[SOLVED] Hover Bar Display issue

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

September 17, 2015, 09:20 AM
CuriousDev
[SOLVED] Hover Bar Display issue
I created a graph stack bar (Dual Axis)using Car File in WF7.7.Hover bar shows values in 10 digit number(eg: 4123500000)which is perfect as expected.But when i copy paste same code in WF8 the values displayed on hover bar with letter B(eg:4.1235B).I want numbers to be displayed in 10 digits in WF 8 .I tried all tooltip function,setTextFormatPreset,setTextFormatPattern nothing worked for me in WF8 to solve the problem.Need Help.

DEFINE FILE CAR
PCTVAL/D6.2B = DECODE COUNTRY('ENGLAND' 5.5 'ITALY' -9.9 ELSE 0) ;
RC1/D7 = RETAIL_COST * 100000;
DC1/D7 = DEALER_COST *100000;
END

GRAPH FILE CAR
-* Created by Advanced Graph Assistant
SUM CAR.BODY.RC1
CAR.BODY.DC1
CAR.BODY.SALES
BY CAR.ORIGIN.COUNTRY
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET VZERO OFF
ON GRAPH SET HAXIS 770
ON GRAPH SET VAXIS 405
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH VBRSTK2
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET GRAPHSTYLE *
setTemplateFile("/images/tdg/template/IBISouthWestern.txt");
setReportParsingErrors(false);
setSelectionEnableMove(false);
setTransparentBorderColor(getSeries(0),true);
setTransparentBorderColor(getSeries(1),true);
setTransparentBorderColor(getSeries(2),true);
setTransparentBorderColor(getSeries(3),true);
setTransparentBorderColor(getSeries(4),true);
setTransparentBorderColor(getSeries(5),true);
setTransparentBorderColor(getSeries(6),true);
setTransparentBorderColor(getSeries(7),true);
setTransparentBorderColor(getSeries(8),true);
setTransparentBorderColor(getSeries(9),true);
setTransparentBorderColor(getSeries(10),true);
setDepthRadius(5);
setTransparentBorderColor(getChartBackground(),true);
setPlace(true);
ENDSTYLE
END

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 8
Windows, All Outputs
September 18, 2015, 10:13 AM
<nick z>
Hi,
Unfortunately there is nothing that can be done in the legacy Chart engine(PNG) in WF8.
setTextFormatPreset will only work on data text and on Axis values. It will not work on tooltips.
I would strongly recommend moving toward HTML5(JSCHART) output format.
In JSCHART format, you can modify the tooltip however you like.

Here is a working example of what you looking for in HTML5(JSCHART) output format:

 
ENGINE INT CACHE SET ON


-*COMPONENT=Define_car
DEFINE FILE ibisamp/car
 RC1/D7=CAR.BODY.RETAIL_COST *100000;
 DC1/D7=CAR.BODY.DEALER_COST *100000;
END
-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 RC1
DC1
CAR.BODY.SALES
BY CAR.ORIGIN.COUNTRY
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET ARGRAPHENGIN JSCHART
ON GRAPH SET VZERO 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 GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET STYLE *
*GRAPH_SCRIPT

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

*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/ENIADefault_combine.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);

*END
*GRAPH_JS
    series: [
    {'series': 'reset',
                   tooltip: function(d,s,g){
                         return this.getSeries(s).label +', ' +
this.groupLabels[g] +': ' + this.formatNumber(d,'#,###') ; }
     },
    ],

*END
ENDSTYLE
END

-RUN


Thanks.
Nick.