Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] How do you display more than 2 decimals in data text?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] How do you display more than 2 decimals in data text?
 Login/Join
 
Guru
posted
In this example bar chart, some values are very small ($0.00099).

When Using JSCHART format, *GRAPH_SCRIPT setting, setTextFormatPreset seems to only offer formats with 2 decimal points.

Does anyone know a way to get more than 2 decimal places in your data text?

Thank you in advance for your help.

-*IA_GRAPH_BEGIN
-*Do not delete or modify the comments below
*-INTERNAL_COMMENT LINE#0$PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8IS0tMS4wLS0+PFJvb3QgdmVyc2lvbj0iMS4wIj4NCiAgICA8T2JqZWN0IG9iamVjdElkPSJDaGFydF8xIj4NCiAgICAgICAgPFByb3BlcnR5IG5hbWU9IkxpbmtlZFNvcnRzIiB0eXBlPSJqYXZhLmxhbmcuU3RyaW5nIj5IT0hfVF9RQlJOT05GT1JNVUxBUllESVNQRU5TRVMuSE9IX1RfUUJSTk9ORk9STVVMQVJZRElTUEVOU0VTLklOVk9JQ0VEQU1PVU5ULDwvUHJvcGVydHk+DQogICAgPC9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W50cnk+DQogICAgICAgIDwvUHJvcGVydHk+DQogICAgICAgIDxQcm9wZXJ0eSBuYW1lPSJjYXNjYWRlTmFtZXMiIHR5cGU9Ik1hcCIvPg0KICAgICAgICA8UHJvcGVydHkgbmFtZT0iTWFzdGVyX0ZpbGVzIiB0eXBlPSJTZXQiPg0KICAgICAgICAgICAgPEVudHJ5IHR5cGU9ImphdmEubGFuZy5TdHJpbmciPkhPSF9UX1FCUk5PTkZPUk1VTEFSWURJU1BFTlNF
*-INTERNAL_COMMENT LINE#1$UzwvRW50cnk+DQogICAgICAgIDwvUHJvcGVydHk+DQogICAgICAgIDxQcm9wZXJ0eSBuYW1lPSJtZXRhZGF0YVZpZXdBcyIgdHlwZT0iTWFwIj4NCiAgICAgICAgICAgIDxFbnRyeSBrZXk9IkhPSF9UX1FCUk5PTkZPUk1VTEFSWURJU1BFTlNFUyIgdHlwZT0iamF2YS5sYW5nLlN0cmluZyI+TWV0YURhdGFUcmVlLlZJRVdfRElNUzwvRW50cnk+DQogICAgICAgIDwvUHJvcGVydHk+DQogICAgICAgIDxQcm9wZXJ0eSBuYW1lPSJlbmFibGVQcmV2aWV3IiB0eXBlPSJqYXZhLmxhbmcuQm9vbGVhbiI+dHJ1ZTwvUHJvcGVydHk+DQogICAgPC9PYmplY3Q+DQo8L1Jvb3Q+DQo=
-*Do not delete or modify the comments above
ENGINE INT CACHE SET ON
-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='450.0';
-DEFAULTH &WF_STYLE_WIDTH='1050.0';
-DEFAULTH &WF_TITLE='WebFOCUS Report';
-DEFAULTH &WF_STYLE_HEIGHT_FACTOR = 3
-*
-*
GRAPH FILE CAR
SUM 
COMPUTE SALES_PERCENTAGE/P33.6M = SALES * 0.000001; AS ''
BY TOTAL HIGHEST 10 SALES NOPRINT
BY MODEL AS ''

ON TABLE 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 GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 2
ON GRAPH SET LOOKGRAPH HBAR
ON GRAPH SET AUTOFIT OFF
ON GRAPH SET STYLE *
UNITS=IN,
ORIENTATION=LANDSCAPE,
SQUEEZE=ON,
FONT=CALIBRI,
SIZE=9,
STYLE=NORMAL,
$

TYPE=HEADING, JUSTIFY=CENTER, FONT=CALIBRI, SIZE=9, STYLE=BOLD, COLOR=RGB(255 255 255), BACKCOLOR=RGB(0 38 58), $
TYPE=FOOTING, JUSTIFY=CENTER, FONT=CALIBRI, SIZE=9, STYLE=NORMAL,$
-*
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(true);
setPlace(true);
setReportParsingErrors(false);
*END
*GRAPH_SCRIPT
-* Text
-*By field text
setFontSizeInPoints(getO1Label(), 9);
setFontSizeAbsolute(getO1Title(), false);
setDisplay(MajorTickDisplay(),false)
setDisplay(MinorTickDisplay(),false)
-*
-* Data Text
setDisplay(getDataText(), true);
setFontSizeAbsolute(getDataText(),false);
setFontName(getDataText(),CALIBRI);
setFontSizeInPoints(getDataText(),9);
setTextFormatPreset(getDataText(),5);
-*
setDisplay(getO1Title(),true);
setFontSizeAbsolute(getO1Label(), true);
-*
setY1LabelDisplay(false);
setFontSizeInPoints(getY1Label(),10);
setDisplay(getY1Title(),false);
setDisplay(getY1Label(),false);
setTextFormatPreset(getY1Label(),5);

-*
-* Fill and background Color
setColorMode(1);
setFillColor(getChartBackground(),new Color(255,255,255));
setFillColor(getFrame(),new Color(255,255,255));
setFillColor(getSeries(0),new Color(0,38,58));
setFillColor(getSeries(1),new Color(51,89,120));

setFillColor(getSeries(2),new Color(102,131,154));
setFillColor(getSeries(3),new Color(153,172,187));
-*
setTransparentBorderColor(getSeries(0), true);
setTransparentBorderColor(getFrameBottom(),true);
setTransparentBorderColor(getFrameSide(),true);
setTransparentFillColor(getFrame(),true);
setTransparentFillColor(getFrameSide(),true);
setTransparentFillColor(getFrameBottom(),true);
-*
setBorderColor(getSeries(0),new Color(72,179,201));
setBorderColor(getSeries(0),new Color(0,38,58));
setBorderColor(getSeries(1),new Color(51,89,120));
setBorderColor(getSeries(2),new Color(102,131,154));
setBorderColor(getSeries(3),new Color(153,172,187));
-*
-* Grid Lines and Borders
setAltFmtFrameNumColors(getY1AltFmtFrame(),5);
setFrameDisplay(false);
setFrameAutoShade(false);
setDisplay(getY1MajorGrid(),false);
setDisplay(getO1MajorGrid(),false);
setO1MajorGridDisplay(false);
setO1AxisLineDisplay(false);
setY1MajorGridDisplay(false);
setY1AxisLineDisplay(false);

ENDSTYLE
END
-RUN  

This message has been edited. Last edited by: Don Garland,


WebFOCUS Administrator @ Worldpay FIS
PROD/DEV/TEST: 8204, SANDBOX: 8206 soon - BIP, Reportcaster, Resource Manager, EUM, HyperStage soon, DB: HIVE,Oracle,MSSQL
 
Posts: 291 | Location: Greater Cincinnati  | Registered: May 11, 2005Report This Post
Virtuoso
posted Hide Post
I think you need to add this to your graph script:

  
setTextFormatPattern(getDataText(),"#.#####");


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Guru
posted Hide Post
quote:
setTextFormatPattern(getDataText(),"#.#####");


Ah man, IRTITFM (its right there in the focus manual)!

That works.

Thank you.


WebFOCUS Administrator @ Worldpay FIS
PROD/DEV/TEST: 8204, SANDBOX: 8206 soon - BIP, Reportcaster, Resource Manager, EUM, HyperStage soon, DB: HIVE,Oracle,MSSQL
 
Posts: 291 | Location: Greater Cincinnati  | Registered: May 11, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] How do you display more than 2 decimals in data text?

Copyright © 1996-2020 Information Builders