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] Tooltip Formatting - Multiple X Axis's

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Tooltip Formatting - Multiple X Axis's
 Login/Join
 
Gold member
posted
I’m trying to format a tooltip for a bar chart with two x axis’s. By default it’s putting in a “>” symbol in for some reason. Is there any way to format a tooltip with multiple x axis’s?

I’ve tried using the following code, but it’s not working:
  
*GRAPH_JS
    series: [
    {'series': 'reset',
                   tooltip: function(d,s,g){
                         return this.getSeries(s).label +', ' +
this.groupLabels[g] +': ' + this.formatNumber(d,'#,###') ; }
     },
    ],

*END


Here is the code I have right now with the default tooltip formatting.

  
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 CAR
-* Created by Info Assist for Graph
SUM CAR.BODY.DEALER_COST
CAR.BODY.RETAIL_COST
BY CAR.ORIGIN.COUNTRY
BY CAR.COMP.CAR
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 &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 VBAR
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0); 
setCurveFitEquationDisplay(false); 
setPlace(true); 
*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/ENIADefault_combine.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
*END
ENDSTYLE
END
-RUN
 
-*IA_GRAPH_FINISH

This message has been edited. Last edited by: Joel Elscott,


WebFOCUS 8.2.03
z/OS
 
Posts: 66 | Registered: May 20, 2013Report This Post
Member
posted Hide Post
Try this in your series. I can't run it in my version on App Studio correctly, but the portal does render correct.

 series: [
{series: 'reset', tooltip: function(v,s,g) {
    x = this.data[0][g].value;
    x = this.formatNumber(x, '$###,###,###.');
    y = this.data[1][g].value;
    y = this.formatNumber(y, '$###,###,###.');
    return this.getSeries(0).label + ': ' + x + '<br>' +
    this.getSeries(1).label + ': ' + y + '<br>' 
    ;}}
,] 


WebFOCUS 8105
Windows, All Outputs
 
Posts: 22 | Registered: May 14, 2015Report This Post
Gold member
posted Hide Post
Thanks for the response Chad! Unfortunately this isn't working for me though, either as a stand alone report or in the portal. The greater than sign still appears. Is this what your code looks like?

  
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 CAR
-* Created by Info Assist for Graph
SUM CAR.BODY.DEALER_COST
CAR.BODY.RETAIL_COST
BY CAR.ORIGIN.COUNTRY
BY CAR.COMP.CAR
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 &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 VBAR
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/ENIADefault_combine.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
 series: [
{series: 'reset', tooltip: function(v,s,g) {
    x = this.data[0][g].value;
    x = this.formatNumber(x, '$###,###,###.');
    y = this.data[1][g].value;
    y = this.formatNumber(y, '$###,###,###.');
    return this.getSeries(0).label + ': ' + x + '<br>' +
    this.getSeries(1).label + ': ' + y + '<br>' 
    ;}}
,] 
*END
ENDSTYLE
END
-RUN


WebFOCUS 8.2.03
z/OS
 
Posts: 66 | Registered: May 20, 2013Report This Post
Member
posted Hide Post
Try changing this line.
 ON GRAPH SET LOOKGRAPH VBAR 
to this:
 ON GRAPH SET LOOKGRAPH VBAR2AX 


WebFOCUS 8105
Windows, All Outputs
 
Posts: 22 | Registered: May 14, 2015Report This Post
Gold member
posted Hide Post
Chad, your first version worked fine. I just didn't have it coded quite right. Thanks for your help!!

Final code for those interested:
  
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 CAR
-* Created by Info Assist for Graph
SUM CAR.BODY.DEALER_COST
CAR.BODY.RETAIL_COST
BY CAR.ORIGIN.COUNTRY
BY CAR.COMP.CAR
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 &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 VBAR
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/ENIADefault_combine.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
*END
*GRAPH_JS
 series: [
{series: 'reset', tooltip: function(v,s,g) {
    x = this.data[0][g].value;
    x = this.formatNumber(x, '$###,###,###.');
    y = this.data[1][g].value;
    y = this.formatNumber(y, '$###,###,###.');
    return this.getSeries(0).label + ': ' + x + '<br>' +
    this.getSeries(1).label + ': ' + y + '<br>' 
    ;}}
,] 
*END
ENDSTYLE
END
-RUN


WebFOCUS 8.2.03
z/OS
 
Posts: 66 | Registered: May 20, 2013Report This Post
Member
posted Hide Post
Happy to help, Joel!


WebFOCUS 8105
Windows, All Outputs
 
Posts: 22 | Registered: May 14, 2015Report This Post
Member
posted Hide Post
quote:
series: [
{series: 'reset', tooltip: function(v,s,g) {
x = this.data[0][g].value;
x = this.formatNumber(x, '$###,###,###.');
y = this.data[1][g].value;
y = this.formatNumber(y, '$###,###,###.');
return this.getSeries(0).label + ': ' + x + '
' +
this.getSeries(1).label + ': ' + y + '
'
;}}
,]


@Chad
This is simple and glorious!!!
DS and AS seem to blow up when you use code under JS_GRAPH but at least I have a solution now. I can handle maintaining code if it means my consumer is happy with the output.
would be nice if a more simple GUI method was out there so I wouldn't have to use java tricks to get things to look right. We have some IBI people coming on site to show us the wonders of AS but I'm not going to hold my breath.

Thanks for the idea Chad!!


WebFOCUS 8.1.0.5 DS, learning AS
Windows, All Outputs
 
Posts: 13 | Registered: February 05, 2016Report This Post
Member
posted Hide Post
-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='405.0';
-DEFAULTH &WF_STYLE_WIDTH='770.0';
-DEFAULTH &WF_TITLE='WebFOCUS Report';
GRAPH FILE CAR
-* Created by Info Assist for Graph
SUM CAR.BODY.DEALER_COST
CAR.BODY.RETAIL_COST
BY CAR.ORIGIN.COUNTRY
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 &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 1
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
*END
-*INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/ENIADefault_combine.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $
*GRAPH_JS
series: [
{series: 'reset', tooltip: function(v,s,g) {
x = this.data[0][g];
x = this.formatNumber(x, '###,###,###.');
y = this.data[1][g];
y = this.formatNumber(y, '###,###,###.');
return this.getSeries(0).label + ': ' + x + '
' +
this.getSeries(1).label + ': ' + y + '
'
;}}
,]
*END
ENDSTYLE
END
 
Posts: 1 | Registered: December 24, 2012Report 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] Tooltip Formatting - Multiple X Axis's

Copyright © 1996-2020 Information Builders