Focal Point
[SOLVED] Appear Content in ToolTip without hoveing over the graph

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/9817041396

April 16, 2020, 12:01 PM
YY
[SOLVED] Appear Content in ToolTip without hoveing over the graph
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,
April 21, 2020, 10:55 AM
FP Mod Chuck
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
April 22, 2020, 06:05 PM
Hallway
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: