Focal Point
[SOLVED] How to Show Thousands Separator in Hover Text Display in a Bar Chart

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

September 24, 2009, 11:20 AM
Craig R.
[SOLVED] How to Show Thousands Separator in Hover Text Display in a Bar Chart
Using the Advanced Graph Assistant (v7.6.9 HF4), I'm creating a "vertical clustered bar" chart showing two series. I can't seem to find the combination of settings needed to add commas to the numerical values displayed automatically when you hover over a bar. I've tried a lot of things -- no soap. If someone has a suggestion, I'd be grateful to hear it...

Thanks,

Craig

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


v8.1.04, 64-bit Windows (Reporting Server), Apache Tomcat (Web/App Server), HTML, PDF, AHTML, Excel outputs
September 24, 2009, 11:25 AM
GinnyJakes
What is the format of your field? The D and F formats provide commas automatically.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
September 24, 2009, 11:29 AM
Craig R.
Ginny:

Both of them are I11. I tried putting a "C" on the end to format them...

Craig


v8.1.04, 64-bit Windows (Reporting Server), Apache Tomcat (Web/App Server), HTML, PDF, AHTML, Excel outputs
September 24, 2009, 11:34 AM
GinnyJakes
GRAPH FILE CAR 
SUM SALES/I11C
BY COUNTRY
END

This works for me. Not done in AGA, though. I'll check out something I already have done and re-post.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
September 24, 2009, 11:46 AM
GinnyJakes
Here is one done in the AGA with fields defined with the D format:
-*INTERNAL_PROPERTIES$SampleData=false;OBJECTID=GLOBAL
-*INTERNAL_PROPERTIES$GlobalRecordLimit=500;OBJECTID=GLOBAL
-*INTERNAL_PROPERTIES$FieldDisplayMode=label;OBJECTID=GLOBAL
-*INTERNAL_PROPERTIES$PrefixDisplayMode=;OBJECTID=GLOBAL
GRAPH FILE CAR
-* Created by Advanced Graph Assistant
SUM CAR.BODY.DEALER_COST
CAR.BODY.RETAIL_COST
BY CAR.ORIGIN.COUNTRY
ON GRAPH PCHOLD AS HOLD FORMAT PNG
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET HAXIS 770
ON GRAPH SET VAXIS 405
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH VBAR
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);
setDepthRadius(5);
setTransparentBorderColor(getChartBackground(),true);
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);
setPlace(true);
ENDSTYLE
END

For each series, you can customize the text format or override using this API command: setDataTextFormat(value);

Hope this helps.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
September 24, 2009, 12:56 PM
Craig R.
Ginny:

Thanks for your reply. I got mine to show commas, too, simply by removing all the API calls except the ones shown in your example. Of course, I lost all the other desired customization I'd put in, as a consequence!

Following is the original "ON GRAPH SET STYLE" list generated by the Advanced Graph Assistant. (Please keep in mind that a lot of these API calls must be as a result of my playing with the various settings in AGA -- turning things on and off, etc.!) Anyway, one (or more) of these calls must be stepping on my desired display format. Does anything here look like an obvious culprit?

ON GRAPH SET GRAPHSTYLE *
setTemplateFile("/images/tdg/template/IBICylinderOnGrey.txt");
setReportParsingErrors(false);
setSelectionEnableMove(false);
setTransparentBorderColor(getChartBackground(),true);
setTransparentBorderColor(getSeries(0),true);
setTransparentBorderColor(getSeries(1),true);
setDisplay(getO1MajorGrid(),true);
setFillColor(getSeries(0),new Color(0,0,0));
setFillType(getSeries(0),2);
setGradientNumPins(getSeries(0),3);
setGradientPinPosition(getSeries(0),0.0,0);
setGradientPinPosition(getSeries(0),0.5,1);
setGradientPinPosition(getSeries(0),1.0,2);
setGradientDirection(getSeries(0),1);
setGradientDirection(getSeries(4),1);
setGradientPinLeftColor(getSeries(0),new Color(122,184,0),1);
setGradientPinRightColor(getSeries(0),new Color(122,184,0),1);
setGradientPinLeftColor(getSeries(1),new Color(252,212,80),1);
setGradientPinRightColor(getSeries(1),new Color(252,212,80),1);
setFillColor(getSeries(4),new Color(137,203,223));
setFillType(getSeries(4),2);
setGradientPinLeftColor(getSeries(4),new Color(137,203,223),1);
setGradientPinRightColor(getSeries(4),new Color(137,203,223),1);
setFillColor(getSeries(3),new Color(252,212,80));
setGradientPinLeftColor(getSeries(3),new Color(252,212,80),1);
setGradientPinRightColor(getSeries(3),new Color(252,212,80),1);
setFillType(getSeries(3),2);
setTransparentBorderColor(getSeries(3),true);
setTextRotation(getY1Title(),1);
setTextString(getSubtitle(),"&SUBTITLE");
setDisplay(getSubtitle(),true);
setTextString(getO1Title(),"&O1TITLE");
setDisplay(getO1Title(),true);
setDepthRadius(5);
setDepthAngle(45);
setFontSizeAbsolute(getO1Label(),true);
setFontSizeInPoints(getO1Label(),7);
setTextString(getTitle(),"R670-T01 Gross vs. &SUBS_HEAD Subscriptions (&MONTHTYPE)");
setDisplay(getTitle(),true);
setLineWidth(getO1MajorGrid(),0);
setLineWidth(getY1MajorGrid(),0);
setGridStyle(getY1MajorGrid(),0);
setPlace(true);
setTextRotation(getO1Label(),1);
setLabelStagger(getO1Label(),false);
setAutoSkip(getO1Label(),1);
setTransparentFillColor(getLegendArea(),false);
setTransparentBorderColor(getLegendArea(),false);
setDisplay(getBeveledLegend(),false);
setLegendMarkerPosition(0);
setFontStyle(getTitle(),0);
setFontSizeInPoints(getTitle(),8);
setPlaceResize(getTitle(),0);
setFontSizeAbsolute(getTitle(),false);
setTextUnderlineType(getTitle(),2);
setTextString(getFootnote(),"&CPY");
setDisplay(getFootnote(),true);
setFontStyle(getFootnote(),0);
setPlaceAlign(getFootnote(),0);
setTextJustHoriz(getFootnote(),0);
setFontSizeAbsolute(getFootnote(),true);
setFontSizeInPoints(getFootnote(),6);
setPlaceResize(getFootnote(),0);
setAxisSide(getO1Axis(),0);
setDisplay(getReferenceLineO1(0),false);
setDisplay(getY1Label(),true);
setTextFormatPreset(getY1Label(),0);
setDisplay(getReferenceLineY1(0),false);
setDisplay(getAnnotation(0),true);
setTextString(getAnnotation(0),"");
setFillColor(getTitle(),new Color(221,71,20));
setAxisSide(getY1Axis(),2);
setTextFormatPreset(getDataText(),15);
setSeriesType(getSeries(1),0);
setDisplay(getDataText(1),false);
setDisplay(getDataText(),false);
setTextString(getY1Title(),"Subscriptions");
setDisplay(getY1Title(),true);
ENDSTYLE

Thanks,

Craig


v8.1.04, 64-bit Windows (Reporting Server), Apache Tomcat (Web/App Server), HTML, PDF, AHTML, Excel outputs
September 24, 2009, 02:16 PM
GinnyJakes
quote:
setTextFormatPreset(getDataText(),15);

It might be that one.
quote:
15=Number with thousands separators, no decimal 1,234 = 1K
places.

Have you downloaded the wf76graphics.pdf manual yet? It has documentation on all of the API commands and is a good reference.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
September 24, 2009, 02:26 PM
Craig R.
Ginny:

Yes, when I comment-out that line, I get the comma separators! Thanks!

And, yes, I will look into getting the manual you mentioned...

Regards,

Craig


v8.1.04, 64-bit Windows (Reporting Server), Apache Tomcat (Web/App Server), HTML, PDF, AHTML, Excel outputs