Focal Point
[SOLVED] setPieLabelDisplay(6) Formatted Value with Comma

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

October 06, 2014, 03:19 PM
GavinL
[SOLVED] setPieLabelDisplay(6) Formatted Value with Comma
Requirements for our pie charts is to have Name, Percentage, and Value with Comma.. The with Comma seems to be the problem, as the Absolute has the comma within the format, but the setPieLabelDisplay(6) doesn't. Is this a bug or is there another way to do this?

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



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
October 08, 2014, 10:55 AM
GavinL
I've attempted to go in at the metadata level and modify the format there and that didn't seem to do anything either. Because this is in a graph, I can't seem to change the format of any of it's data outside the single digit numeric value I'm passing in. I've opened a ticket to see if this is possibly a bug.



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
October 08, 2014, 11:38 AM
Francis Mariani
On October 29, 2012, for the client I was working for at the time, I opened a case, "Pie graph does not display commas in tooltip". Status: "In Product Division".

On Mar 11, 2014, for the client I currently work for, I opened a case, "Thousands comma separator does not show in graph tooltips". Status: "IBI Researching".


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
October 08, 2014, 03:32 PM
GavinL
Thanks for your input. At least I know I'm not crazy now. Smiler



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
October 09, 2014, 12:40 PM
<nick z>
Hi GavinL,
Here is a code that would work in WF8008 in HTML5 output format:

 
GRAPH FILE CAR
SUM 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 GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH PIEMULTI
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0); 
setCurveFitEquationDisplay(false); 
setPlace(true); 
setPieFeelerTextDisplay(1); 
*END
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
setPieLabelDisplay(6);
*END
*GRAPH_JS
dataLabels: {visible:true,
formatCallback: function(d, s,g,data)
{
return '' + this.getSeries(s).label + ' ' +this.formatNumber(d, '#,#')+'('+this.formatNumber(d/data.total,'#.##%')+')';}
},
series: [
{series: 'all', showDataValues:true},
],

*END
ENDSTYLE
END

-RUN




Thank you.
October 09, 2014, 01:05 PM
Francis Mariani
Nick, thanks for the suggestion. But we have to be careful that all the other carefully tweaked graph styling still works.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
October 10, 2014, 09:28 AM
GavinL
Nick, that seemed to work perfectly..!!! You rock.

Francis, I'm not sure I understand the concern.

I changed his format to match up with the way it would normally. Is this what you meant?

return '' + ' ' +this.formatNumber(d, '#,#')+' ('+this.formatNumber(d/data.total,'#.##%')+') '+this.getSeries(s).label;}



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
October 10, 2014, 10:10 AM
GavinL
I did find a problem with using this code and maybe this was what you were referring to Francis. Once added, the report can no longer be opened in InfoAssist or another visual editor.



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server