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     [CLOSED]Series 0 with proper label and Y label w/o decimal in optional K

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED]Series 0 with proper label and Y label w/o decimal in optional K
 Login/Join
 
Virtuoso
posted
Hi folks,

I need help to figure out how to have my Series 0 properly labeled even with only one series and have Y label without decimal but keeping the K (thousands) displayed when applicable.

Here a sample
ENGINE INT CACHE SET ON
-DEFAULTH &WF_TITLE='WebFOCUS Report';
GRAPH FILE ggsales
SUM COMPUTE SAL/P12.2C = IF GGSALES.SALES01.REGION EQ 'Midwest' THEN GGSALES.SALES01.DOLLARS / 10036 ELSE GGSALES.SALES01.DOLLARS; AS 'Sales$'
BY GGSALES.SALES01.REGION
BY GGSALES.SALES01.CITY
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET GRWIDTH 2
ON GRAPH SET HAXIS 770.0
ON GRAPH SET VAXIS 150.0
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 1
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH VLINE
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
setUseSeriesShapes(true);
setMarkerSizeDefault(50);
*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/ENIADefault_combine.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, ORIENTATION=LANDSCAPE, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
setAltFmtFrameNumColors(getY1AltFmtFrame(),5);
setDisplay(getO1MajorGrid(),false);
setAltFmtFrameNumColors(getO1AltFmtFrame(),5);
setDisplay(getY1MajorGrid(),true);
setTransparentFillColor(getFrame(),true);
setFrameAutoShade(false);
setTextString(getY1Title(),"");
setExcludeMinLabel(getO1Label(),false);
setScaleMustIncludeZero(getY1Axis(),false);
setLegendPosition(2);
setTextString(getO1Title(),"");
setFillColor(getSeries(0),new Color(8,96,74));
setReferenceTextPosition(getReferenceLineTextY1(0),2);
setDisplay(getReferenceLineY1(0),true);
setBorderColor(getReferenceLineY1(0),new Color(255,0,0));
setFillColor(getReferenceLineTextY1(0),new Color(255,0,0));
setTextFormatPreset(getY1Label(),0);
setDisplay(getLegendArea(),true);
-* DISPLAY NO DECIMAL BUT ALSO WITH FULL NUMBER LENGTH, WHICH I DON'T WANT. NEED K DISPLAYED
-*setTextFormatPreset(getY1Label(),1);
*END
ENDSTYLE
END
-RUN


In above sample you can see:

First : that "series 0" is still displayed in both legend and popup where I want "Sales $".
If I have two series, each one has the proper title displayed, but with only one series, it shows "Series 0".
I need to have "Sales $".

Second : the Y label.
You can see that for Midwest it has decimal displayed and for others the label is in "K" (thousands).
I need to remove the decimals but keeping the "K" when it's applicable.
None of the available label format do that.
If I use the no decimal format (setTextFormatPreset(getY1Label(),1); ), the "K" disappear to be replaced by the whole number.

Is there a way to accomplish both of my request ?

Tks

This message has been edited. Last edited by: <Emily McAllister>,


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Expert
posted Hide Post
The first piece is easy by just dropping into the GRAPH_JS properties -
*GRAPH_JS
  series: [
    {series: 0, label: "Sales$"}
  ]
*END


I'll see if I can achieve the second part, although I am not seeing the "K" part on the tooltip, just comma thousand seperators and full numbers.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Virtuoso
posted Hide Post
Thanks Tony, it does the trick
quote:
*GRAPH_JS
series: [
{series: 0, label: "Sales$"}
]
*END


For the popup I don't mind to have the whole number and I do prefer to have it.
If finally I need to have the K displayed in the popup, there are several discussions that shows how to perform such thing.


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Platinum Member
posted Hide Post
Martin,

Are you restricted to VAXIS width of 150?
If not, increasing it removes the decimals.


WebFOCUS
7703/7705/8105m/8201m/8202m

 
Posts: 99 | Registered: September 10, 2013Report This Post
Virtuoso
posted Hide Post
Thanks for the suggestion WF1326, but increasing the VAXIS creates the problem in other graph.

If you try my sample with VAXIS 200, first graph will be ok, but the below one then have decimal displayed where it don't previously.

The solution cannot be by playing with the size since the Y-grid is dynamically set according to available space.


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Guru
posted Hide Post
Martin,

WebFOCUS Graphics
Page 318

Is your real data similar to the example with #s below and above 1000s ? How do you want the Midwest #s to look if the value is below 1000s?

setTextFormatPreset(getY1Label(),7);

setDataTextFormat(value);
value = getDataTextFormat();
where:
value
Is an integer value between -1 and 21. 0 is the default value.
-1 to use the pattern defined by DataTextFormatPattern.
0/1 for # (for example, 123 = 123)
2 for #% (for example, 123 = 12,300%)
3 for #.#% (for example, 123 = 12,300.0%)
4 for #.##% (for example, 123 = 12,300.00%)
5 for $#.## (for example, 123 = $123.00)
6 for $# (for example, 123 = $123)
7 for #K (show K for values over 999) (for example, 1,234 = 1K)
8 for $#K (show K for values over 999) (for example, 1,234 = $1K)
9 for #M (show M for millions) (for example, 1,234,567 = 1M)
10 for $#M (show M for millions) (for example, 1,234,567 = $1M)
11 for #B (show B for billions) (for example, 1,234,567,891 = 1B)
12 for $#B (show B for billions) (for example, 1,234,567,891 = $1B)
13 for #T (show T for trillions) (for example, 1,234,567,891,234 = 1T)
14 for $#T (show T for trillions) (for example, 1,234,567,891,234 = $1T)
15 for number with thousands separators, no decimal places (for example, 1,234 = 1K)
16 for number with thousands separators, two decimal places (for example, 1,234 = 1.23K)
17 for general currency format for current Locale
18 for Short Date Format: MM/DD/YY (for example, 10/01/03)

--- couple more related to date formatting ---


Thank your for participating in the Focal Point Forum,
Tamra Colangelo
Focal Point Moderator
Information Builders


WebFOCUS 8x - BI Portal, Developer Studio, App Studio, Excel, PDF, Active Formats and HTML5
 
Posts: 487 | Location: Toronto | Registered: June 23, 2009Report This Post
Virtuoso
posted Hide Post
Hi Tamra,

Sorry for late answer.

Answer Q1 : yes, above and below 1000s
Answer Q2 : without decimals, meaning whole number.
Actually the Y-Axis Major grid are 368, 373.6, 379.2, 384.8, 390.4 and 396
I was attempting to see something such as 360, 370, 380, 390, 400


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report 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     [CLOSED]Series 0 with proper label and Y label w/o decimal in optional K

Copyright © 1996-2020 Information Builders