Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Appear Content in ToolTip without hoveing over the graph
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] Appear Content in ToolTip without hoveing over the graph
 Login/Join
 
Member
posted
Hi,

I am building a dashboard using Matrix Chart.

Is there a way to show the Model info in ToolTip on each cell without hovering mouse over the graph? In other word, showing the model info in ToolTip as a label for the cell that has data.

Using Car data as an example:


ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
-DEFAULTH &WF_HTMLENCODE=OFF;
SET HTMLENCODE=&WF_HTMLENCODE

SET ARGRAPHENGINE=JSCHART
-DEFAULTH &WF_EMPTYREPORT=ON;
SET EMPTYREPORT=&WF_EMPTYREPORT

SET EMBEDHEADING=ON
SET GRAPHDEFAULT=OFF
-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='405.0';
-DEFAULTH &WF_STYLE_WIDTH='770.0';

-DEFAULTH &WF_TITLE='WebFOCUS Report';
GRAPH FILE dataportu/car
-* Created by Info Assist for Graph
SUM CAR.BODY.SALES
FST.CAR.CARREC.MODEL AS 'MODEL'
BY CAR.ORIGIN.COUNTRY
BY CAR.BODY.BODYTYPE
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO 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 LOOKGRAPH BAR
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/ibi_themes/Warm.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, ORIENTATION=LANDSCAPE, $
TYPE=DATA, COLUMN=N1, BUCKET=row, $
TYPE=DATA, COLUMN=N2, BUCKET=column, $
TYPE=DATA, COLUMN=N3, BUCKET=y-axis, $
TYPE=DATA, COLUMN=N4, BUCKET=tooltip, $
*GRAPH_SCRIPT

setReportParsingErrors(false);
setSelectionEnableMove(false);

*END
ENDSTYLE
END

-RUN

Thanks!!

YY

This message has been edited. Last edited by: FP Mod Chuck,
 
Posts: 10 | Registered: September 05, 2018Reply With QuoteReport This Post
Virtuoso
posted Hide Post
YY

I do not think there is a way to do this without making a tool tip. If this is still an issue please open a case with techsupport to verify if I am correct.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 1944 | Location: Customer Support | Registered: April 12, 2005Reply With QuoteReport This Post
Master
posted Hide Post
You can put the value(s) in the tooltip bucket(s) as labels using the JSON Properties for HTML5 Charts.

Check out the docs: Introduction to JSON Properties for HTML5 Charts

The last section, Using the Chart Template Engine to Customize Tooltips and Data Labels, makes it pretty easy.

In the code below, I added an extra value in the tooltip bucket to show that you can add multiple tooltip values to the label.

  
ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
-DEFAULTH &WF_HTMLENCODE=OFF;
SET HTMLENCODE=&WF_HTMLENCODE

SET ARGRAPHENGINE=JSCHART
-DEFAULTH &WF_EMPTYREPORT=ON;
SET EMPTYREPORT=&WF_EMPTYREPORT

SET EMBEDHEADING=ON
SET GRAPHDEFAULT=OFF
-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.SALES
FST.CAR.COMP.CAR AS 'CAR'
FST.CAR.CARREC.MODEL AS 'MODEL'
BY CAR.ORIGIN.COUNTRY
BY CAR.BODY.BODYTYPE
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO 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 LOOKGRAPH BAR
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/ibi_themes/Warm.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, ORIENTATION=LANDSCAPE, $
TYPE=DATA, COLUMN=N1, BUCKET=row, $
TYPE=DATA, COLUMN=N2, BUCKET=column, $
TYPE=DATA, COLUMN=N3, BUCKET=y-axis, $
TYPE=DATA, COLUMN=N4, BUCKET=tooltip, $
TYPE=DATA, COLUMN=N5, BUCKET=tooltip, $
*GRAPH_SCRIPT

setReportParsingErrors(false);
setSelectionEnableMove(false);

*GRAPH_JS_FINAL
    "dataLabels": {
        "visible":true,
        "formatCallback": null, 
        "displayMode": null
    },
    "series":[{
        "series": "reset",
        "dataLabels":{
            "content":"{{tooltip1}}\n{{tooltip2}}"
        }
    }],
*END
ENDSTYLE
END


Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
 
Posts: 607 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Appear Content in ToolTip without hoveing over the graph

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.