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] X-Axis Labels - Not able to format - JSCHART

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] X-Axis Labels - Not able to format - JSCHART
 Login/Join
 
Master
posted
Hello

I have a JSCHART in this format. All look fine but I am having problem with X-axis labels which are year and month. Values for month are upon one another and unable to read and the tool doesn't have any options to format these. Can anyone please suggest a way to format these clearly?

I did a NOPRINT on Month and then it was OK but users want to see both month and year when they hover over the graph. In this case only year is seen.

  
GRAPH FILE GR1
SUM
VAL1
VAL2
VAL3
BY YEAR
BY MONTH
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET GRWIDTH 1
ON GRAPH SET UNITS PIXELS
ON GRAPH SET HAXIS 700
ON GRAPH SET VAXIS 500
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 2
ON GRAPH SET LOOKGRAPH VLINE
ON GRAPH SET AUTOFIT OFF
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
setUseSeriesShapes(true);
setMarkerSizeDefault(20);
setFillColor(getFrame(),new Color(255,255,255));
*END
INCLUDE=endeflt.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
setTextRotation(getO1Label(),2);
setFontSizeAbsolute(getO1Label(),true);
setFontSizeInPoints(getO1Label(),8);
*GRAPH_JS
"introAnimation": {
    "duration": 1500,
    "enabled": true
},
"riserBevel": "bevel"
,
*END
ENDSTYLE
END

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


8.1.05
HTML,PDF,EXL2K, Active, All
 
Posts: 484 | Registered: February 03, 2009Report This Post
Virtuoso
posted Hide Post
May not be an optimal solution since I don't have all information such as field format and requested output display, but this may solve the issue, at least gives an idea to solve it:
DEFINE FILE GR1
YRMTH /A20V = YEAR || '-' || MONTH;
END
GRAPH FILE GR1
SUM
VAL1
VAL2
VAL3
BY YRMTH
...


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
Master
posted Hide Post
quote:
Originally posted by MartinY:
May not be an optimal solution since I don't have all information such as field format and requested output display, but this may solve the issue, at least gives an idea to solve it:
DEFINE FILE GR1
YRMTH /A20V = YEAR || '-' || MONTH;
END
GRAPH FILE GR1
SUM
VAL1
VAL2
VAL3
BY YRMTH
...


Martin, I already have this as an alternative. But the data backs to 10 years which means we are looking at 120 labels. So labels are not looking good. I tried rotating them, changing font size etc but they not much help.

By the method I posted, tool actually groups all month above year. So year is shown only as a group with 12 months. But the values of 12 months are over each other.

Showing year and month in hover data but only year on x-axis label also works. But I don't think this is possible.


8.1.05
HTML,PDF,EXL2K, Active, All
 
Posts: 484 | Registered: February 03, 2009Report This Post
Virtuoso
posted Hide Post
Why not using the ISO 3 letters month abbreviation instead of the full month's name ?

DEFINE FILE GR1
MTH3 /A3 = DECODE MONTH ('JANUARY' 'JAN' 'FEBRUARY' 'FEB' ....);
END
GRAPH FILE GR1
SUM
VAL1
VAL2
VAL3
BY YEAR
BY MTH3 AS 'MONTH'
...


You may also need to have a numeric month to keep months in proper order
DEFINE FILE GGSALES
YR  /YYYY = DATE;
MTH /M    = DATE;
MTHX/A3 = DECODE MTH (1 ,'JAN' 2 'FEB' 3 'MAR' 4 'APR' 5 'MAY' 6 'JUN' 7 'JUL' 8 'AUG' 9 'SEP' 10 'OCT' 11 'NOV' 12 'DEC');
END
GRAPH FILE GGSALES
SUM UNITS
    DOLLARS
BY YR  AS 'YEAR'
BY MTH AS ''
BY MTHX AS 'MONTH'
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET GRWIDTH 1
ON GRAPH SET UNITS PIXELS
ON GRAPH SET HAXIS 700
ON GRAPH SET VAXIS 500
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 3
ON GRAPH SET LOOKGRAPH VLINE
ON GRAPH SET AUTOFIT OFF
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
setUseSeriesShapes(true);
setMarkerSizeDefault(20);
setFillColor(getFrame(),new Color(255,255,255));
setDisplay(getO1Title(),false);
*END
INCLUDE=endeflt.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
setTextRotation(getO1Label(),2);
setFontSizeAbsolute(getO1Label(),true);
setFontSizeInPoints(getO1Label(),8);
*GRAPH_JS
"introAnimation": {
    "duration": 1500,
    "enabled": true
},
"riserBevel": "bevel"
,
*END
ENDSTYLE
END

Pay attention that I added
setDisplay(getO1Title(),false);

which not display the x-axis label at bottom.

And if you want to remove the third level and be back to only two (Yr and Mth) you'll have to concatenate the MTH and MTHX in one field since I can't find anyway to have MTH as NOPRINT

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


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] X-Axis Labels - Not able to format - JSCHART

Copyright © 1996-2020 Information Builders