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] Need help in Sorting Months in Stacked Bar chart

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Need help in Sorting Months in Stacked Bar chart
 Login/Join
 
Member
posted
Hi All,

Below is sample of Stacked Bar chart. I need help in Sorting months. (Jan to Dec)


DEFINE FILE GGSALES
MON/M=DATE;

MONTH/A15= IF MON EQ '01' THEN 'January' ELSE IF MON EQ '02' THEN 'February'
ELSE IF MON EQ '03' THEN 'March' ELSE IF MON EQ '04' THEN 'April'
ELSE IF MON EQ '05' THEN 'May' ELSE IF MON EQ '06' THEN 'June'
ELSE IF MON EQ '07' THEN 'July' ELSE IF MON EQ '08' THEN 'August'
ELSE IF MON EQ '09' THEN 'September' ELSE IF MON EQ '10' THEN 'October'
ELSE IF MON EQ '11' THEN 'November' ELSE 'December';

END

-* File: IBFS:/Dev/EDA/EDASERVE/APPPATH/csclient/Chart2.fex Created by WebFOCUS AppStudio
-*IA_GRAPH_BEGIN
-*Do not delete or modify the comments below
*-INTERNAL_COMMENT LINE#0$PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8IS0tMS4wL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Um9vdD4NCg==
-*Do not delete or modify the comments above
ENGINE INT CACHE SET ON
-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='405.0';
-DEFAULTH &WF_STYLE_WIDTH='770.0';
-DEFAULTH &WF_TITLE='WebFOCUS Report';
GRAPH FILE GGSALES
-* Created by Info Assist for Graph
SUM DOLLARS
BY REGION
ACROSS MONTH
HEADING
"Monthwise Network Breakup"
ON GRAPH PCHOLD FORMAT HTML
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET GRWIDTH 1
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 1
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH VBRSTK1
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
*END
INCLUDE=endeflt.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $
TYPE=HEADING, JUSTIFY=CENTER, FONT='ARIAL', SIZE=8, COLOR=RGB(66 70 73), STYLE=BOLD, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
setDisplay(getDataText(0), true);
setStackedDataValueSum(false);
setZeroValueDataTextStackedTotalOnTopDisplay(false);
setFontName(getDataText(),"ARIAL");
setFontSizeAbsolute(getDataText(),true);
setAutofit(getDataText(),false);
setFontSizeInPoints(getDataText(),7);
setPlaceResize(getDataText(),0);
setFillColor(getDataText(),new Color(255,255,255));
setFontName(getO1Label(),"ARIAL");
setFontName(getLegendText(),"ARIAL");
setFontSizeAbsolute(getLegendText(),true);
setAutofit(getLegendText(),false);
setPlaceResize(getLegendText(),0);
setFontSizeInPoints(getLegendText(),8);
setDisplay(getY1Title(),false);
setDisplay(getY1Label(),false);
setDisplay(getO1Title(),false);
setFontSizeAbsolute(getO1Label(), true);
setFontSizeInPoints(getO1Label(), 8);
setPlaceResize(getO1Label(), 0);
setFontStyle(getO1Label(),0);
setDisplay(getO1MajorGrid(),false);
setFillColor(getFrame(),new Color(255,255,255));
setFillColor(getSeries(0),new Color(0,121,193));
setFillColor(getSeries(1),new Color(232,109,31));
setFillColor(getSeries(2),new Color(108,179,63));
setFillColor(getSeries(3),new Color(88,89,91));
-*setFillColor(getSeries(4),new Color(0,0,0));
setDataTextPosition(4);
setTextFormatPattern(getDataText(),"#.#");
setDisplay(getDataText(7), true);
setDataTextDisplay(true);
setTextFormatPreset(getDataText(),29);
setDepthRadius(5);
setDepthAngle(45);
setPieTilt(10);
setPieDepth(70);
*END
ENDSTYLE
END
-RUN

-*IA_GRAPH_FINISH


The below option not working on graph. Please let me know how to go about it.

ACROSS MONTH
ACROSS MON NOPRINT

Thanks,
Yashwanth

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 7.7.3
Windows, All Outputs
 
Posts: 11 | Registered: September 01, 2015Report This Post
Expert
posted Hide Post
This can be easier than you think!

You have obviously realised the issues sorting on alpha representations of dates, so the answer is to use a date format that will give you the month name in full.

Go to this link and search on Mtr.

You will soon realise that you can do this -

DEFINE FILE GGSALES
MON/Mtr=DATE;
END
ENGINE INT CACHE SET ON
GRAPH FILE GGSALES
SUM DOLLARS
BY REGION
ACROSS MON
HEADING
"Monthwise Network Breakup"


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
Member
posted Hide Post
Thanks a lot Tony! I didn't think of this option and it works like a charm!!

I have another requirement of similar sorting with an alphanumeric below. Is there a way to sort this? Below is the sample code!

DEFINE FILE GGSALES
MON/M=DATE;

MONTH/A15= IF MON EQ '01' THEN 'January ABC' ELSE IF MON EQ '02' THEN 'February ABC'
ELSE IF MON EQ '03' THEN 'March ABC' ELSE IF MON EQ '04' THEN 'April ABC'
ELSE IF MON EQ '05' THEN 'May ABC' ELSE IF MON EQ '06' THEN 'June ABC'
ELSE IF MON EQ '07' THEN 'July ABC' ELSE IF MON EQ '08' THEN 'August ABC'
ELSE IF MON EQ '09' THEN 'September ABC' ELSE IF MON EQ '10' THEN 'October ABC'
ELSE IF MON EQ '11' THEN 'November ABC' ELSE 'December ABC';

END

-* File: IBFS:/Dev/EDA/EDASERVE/APPPATH/csclient/Chart2.fex Created by WebFOCUS AppStudio
-*IA_GRAPH_BEGIN
-*Do not delete or modify the comments below
*-INTERNAL_COMMENT LINE#0$PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8IS0tMS4wLS0+PFJvb3QgdmVyc2lvbj0iMS4xIj4NCiAgICA8T2JqZWN0IG9iamVjdElkPSJDaGFydF8xIj4NCiAgICAgICAgPFByb3BlcnR5IG5hbWU9IkxpbmtlZFNvcnRzIiB0eXBlPSJqYXZhLmxhbmcuU3RyaW5nIi8+DQogICAgICAgIDxQcm9wZXJ0eSBuYW1lPSJDcm9zc1RhYk1vZGUiIHR5cGU9ImphdmEubGFuZy5Cb29sZWFuIj50cnVlPC9Qcm9wZXJ0eT4NCiAgICA8L09iamVjdD4NCiAgICA8T2JqZWN0IG9iamVjdElkPSJHTE9CQUwiPg0KICAgICAgICA8UHJvcGVydHkgbmFtZT0iU2FtcGxlRGF0YSIgdHlwZT0iamF2YS5sYW5nLkJvb2xlYW4iPmZhbHNlPC9Qcm9wZXJ0eT4NCiAgICAgICAgPFByb3BlcnR5IG5hbWU9Ikdsb2JhbFJlY29yZExpbWl0IiB0eXBlPSJqYXZhLmxhbmcuU3RyaW5nIj41MDA8L1Byb3B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mowaU1TNHdJaUJsYm1OdlpHbHVaejBpVlZSR0xUZ2lJSE4wWVc1a1lXeHZibVU5SW01dklqOCtQQ0V0TFVOUFRWQk1SVlJGWDFOTVNVTkZVbDlIVWs5VlVDMHRQanhUVEVsRFJWSmZSMUpQVlZBK1BFZFNUMVZRSUdkeWIzVndUblZ0WW1WeVBTSXdJaUJ6YkdsalpYSkhjbTkxY0V4aFltVnNQU0pIY205MWNDQXhJaUJ6YkdsalpYSkhjbTkxY0U5eVpHVnlQU0l3SWlCemJHbGpaWEpIY205MWNGTnBlbVU5SWpBaUlITnNhV05sY2tkeWIzVndhR2xrWlQwaVptRnNjMlVpTHo0OEwxTk1TVU5GVWw5SFVrOVZVRDQ9PC9Qcm9wZXJ0eT4NCiAgICAgICAgPFByb3BlcnR5IG5hbWU9ImVuYWJsZVByZXZpZXciIHR5cGU9ImphdmEubGFuZy5Cb29sZWFuIj50cnVlPC9Qcm9wZXJ0eT4NCiAgICA8L09iamVjdD4NCjwvUm9vdD4NCg==
-*Do not delete or modify the comments above
ENGINE INT CACHE SET ON
-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='405.0';
-DEFAULTH &WF_STYLE_WIDTH='770.0';
-DEFAULTH &WF_TITLE='WebFOCUS Report';
GRAPH FILE GGSALES
-* Created by Info Assist for Graph
SUM DOLLARS
BY REGION
ACROSS MONTH
HEADING
"Monthwise Network Breakup"
ON GRAPH PCHOLD FORMAT HTML
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET GRWIDTH 1
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 1
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH VBRSTK1
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
*END
INCLUDE=endeflt.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $
TYPE=HEADING, JUSTIFY=CENTER, FONT='ARIAL', SIZE=8, COLOR=RGB(66 70 73), STYLE=BOLD, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
setDisplay(getDataText(0), true);
setStackedDataValueSum(false);
setZeroValueDataTextStackedTotalOnTopDisplay(false);
setFontName(getDataText(),"ARIAL");
setFontSizeAbsolute(getDataText(),true);
setAutofit(getDataText(),false);
setFontSizeInPoints(getDataText(),7);
setPlaceResize(getDataText(),0);
setFillColor(getDataText(),new Color(255,255,255));
setFontName(getO1Label(),"ARIAL");
setFontName(getLegendText(),"ARIAL");
setFontSizeAbsolute(getLegendText(),true);
setAutofit(getLegendText(),false);
setPlaceResize(getLegendText(),0);
setFontSizeInPoints(getLegendText(),8);
setDisplay(getY1Title(),false);
setDisplay(getY1Label(),false);
setDisplay(getO1Title(),false);
setFontSizeAbsolute(getO1Label(), true);
setFontSizeInPoints(getO1Label(), 6);
setPlaceResize(getO1Label(), 0);
setFontStyle(getO1Label(),0);
setDisplay(getO1MajorGrid(),false);
setFillColor(getFrame(),new Color(255,255,255));
setFillColor(getSeries(0),new Color(0,121,193));
setFillColor(getSeries(1),new Color(232,109,31));
setFillColor(getSeries(2),new Color(108,179,63));
setFillColor(getSeries(3),new Color(88,89,91));
-*setFillColor(getSeries(4),new Color(0,0,0));
setDataTextPosition(4);
setTextFormatPattern(getDataText(),"#.#");
setDisplay(getDataText(7), true);
setDataTextDisplay(true);
setTextFormatPreset(getDataText(),29);
setDepthRadius(5);
setDepthAngle(45);
setPieTilt(10);
setPieDepth(70);
*END
ENDSTYLE
END
-RUN

-*IA_GRAPH_FINISH

-EXIT

Thanks,
Yashwanth


WebFOCUS 7.7.3
Windows, All Outputs
 
Posts: 11 | Registered: September 01, 2015Report This Post
Virtuoso
posted Hide Post
Hi Yashwanth

I attempted to add ACROSS MON NOPRINT before the ACROSS MONTH but it yielded a FOC32466 Merge dimensions exceeded. I then changed the ON GRAPH SET GRMERGE ADVANCED to ON GRAPH SET GRMERGE ON but the labels showed the MON and not the MONTH values.

You may want to open a case on this as there must be some combination that will show this properly.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 2127 | Location: Customer Support | Registered: April 12, 2005Report This Post
Virtuoso
posted Hide Post
Tom

You are getting the same results I am. The label for the month is the numeric month not the alpha month name...


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 2127 | Location: Customer Support | Registered: April 12, 2005Report This Post
Virtuoso
posted Hide Post
Tom,
Still displaying the XMON value and not the MONTH one (even after fixing the DEFINE to evaluate XMON).

The goal is to sort the period by XMON (NOPRINT) to then display the MONTH value in a proper calendar order and not alphabetically.


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
Gee Martin, Thanks!

Hi Chuck,
Yep, missed that, don't think it has ever worked. Was looking for something I had done, OR, thought I had done, can't find it.
I think you may be right that it is a bug, but, I always use a workaround, below...
Added 2 lines at the bottom in the styling...
Tom

DEFINE FILE GGSALES
XMON/M=DATE;
MONTH/A20= DECODE XMON(
'01' '01-January ABC'
'02' '02-February ABC'
'03' '03-March ABC'
'04' '04-April ABC'
'05' '05-May ABC'
'06' '06-June ABC'
'07' '07-July ABC'
'08' '08-August ABC'
'09' '09-September ABC'
'10' '10-October ABC'
'11' '11-November ABC'
'12' '12-December ABC' ELSE '99-Unknown');
END

ENGINE INT CACHE SET ON
-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='405.0';
-DEFAULTH &WF_STYLE_WIDTH='770.0';
-DEFAULTH &WF_TITLE='WebFOCUS Report';
GRAPH FILE GGSALES
-* Created by Info Assist for Graph
SUM DOLLARS
BY REGION
ACROSS MONTH
HEADING
"Monthwise Network Breakup"
ON GRAPH PCHOLD FORMAT HTML
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET GRWIDTH 1
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 1
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH VBRSTK1
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
*END
INCLUDE=endeflt.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $
TYPE=HEADING, JUSTIFY=CENTER, FONT='ARIAL', SIZE=8, COLOR=RGB(66 70 73), STYLE=BOLD, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
setDisplay(getDataText(0), true);
setStackedDataValueSum(false);
setZeroValueDataTextStackedTotalOnTopDisplay(false);
setFontName(getDataText(),"ARIAL");
setFontSizeAbsolute(getDataText(),true);
setAutofit(getDataText(),false);
setFontSizeInPoints(getDataText(),7);
setPlaceResize(getDataText(),0);
setFillColor(getDataText(),new Color(255,255,255));
setFontName(getO1Label(),"ARIAL");
setFontName(getLegendText(),"ARIAL");
setFontSizeAbsolute(getLegendText(),true);
setAutofit(getLegendText(),false);
setPlaceResize(getLegendText(),0);
setFontSizeInPoints(getLegendText(),8);
setDisplay(getY1Title(),false);
setDisplay(getY1Label(),false);
setDisplay(getO1Title(),false);
setFontSizeAbsolute(getO1Label(), true);
setFontSizeInPoints(getO1Label(), 6);
setPlaceResize(getO1Label(), 0);
setDisplay(getO1MajorGrid(),false);
setFillColor(getFrame(),new Color(255,255,255));
setFillColor(getSeries(0),new Color(0,121,193));
setFillColor(getSeries(1),new Color(232,109,31));
setFillColor(getSeries(2),new Color(108,179,63));
setFillColor(getSeries(3),new Color(88,89,91));
-*setFillColor(getSeries(4),new Color(0,0,0));
setDataTextPosition(4);
setTextFormatPattern(getDataText(),"#.#");
setDisplay(getDataText(7), true);
setDataTextDisplay(true);
setTextFormatPreset(getDataText(),29);
setDepthRadius(5);
setDepthAngle(45);
setPieTilt(10);
setPieDepth(70);

setLabelStagger(getO1Label(),true);
setFontStyle(getO1Label(),2);

*END
ENDSTYLE
END
-RUN


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Expert
posted Hide Post
You could always override the groupLabels property within GRAPH_JS -

-DEFAULTH &GRPLBLS = ''
DEFINE FILE GGSALES
  MON/Mtr   = DATE;
  MONTH/A22 = LCWORD(17,CHGDAT('YYMD','MX',DATECVT(DATE,'I8YYMD','A8YYMD'),'A17'),'A17') || ' ABC';
END

TABLE FILE GGSALES
SUM COMPUTE CNTR/I2 = LAST CNTR + 1; NOPRINT
     COMPUTE GRPLBLS/A264V = IF CNTR EQ 1 THEN ''''||MONTH||''''
                                         ELSE LAST GRPLBLS||','''||MONTH||''''; 
  BY MON
  BY MONTH
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS MYLABELS
END
-RUN
TABLE FILE MYLABELS
SUM GRPLBLS
  BY HIGHEST 1 MON NOPRINT
  BY MONTH NOPRINT
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS MYLABEL
END
-RUN
-READFILE MYLABEL

....

*GRAPH_JS
groupLabels:[&GRPLBLS.EVAL]
*END


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
  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] Need help in Sorting Months in Stacked Bar chart

Copyright © 1996-2020 Information Builders