Focal Point
[CLOSED] Tooptip for reference lines?

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

September 27, 2018, 03:40 PM
Shingles
[CLOSED] Tooptip for reference lines?
Hello,
How would one create a tooltip for a reference line? I know how to make a label appear, but I would prefer if the text to display would only show when a user hovers over the reference line. So is that possible?

I created a quick line graph with a green reference line. I would like the green reference line to have a tooptip appear when a user hovers over it.
  


GRAPH FILE ibisamp/car
-* Created by Info Assist for Graph
SUM CAR.SPECS.LENGTH
BY CAR.ORIGIN.COUNTRY
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET ARGRAPHENGIN JSCHART
ON GRAPH SET EMBEDHEADING ON
ON GRAPH SET VZERO OFF
ON GRAPH SET GRWIDTH 1
ON GRAPH SET LOOKGRAPH LINE
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT

setPieDepth(0);
setPieTilt(0);
setDepthRadius(0); 
setCurveFitEquationDisplay(false); 
setPlace(true); 
setUseSeriesShapes(true);
setMarkerSizeDefault(50); 

*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $
TYPE=DATA, COLUMN=N1, BUCKET=x-axis, $
TYPE=DATA, COLUMN=N2, BUCKET=y-axis, $
*GRAPH_SCRIPT

setDisplay(getReferenceLineY1(0),true);
setBorderColor(getReferenceLineY1(0)  ,new Color(26,148,26));
setFillColor(getReferenceLineY1(0)    ,new Color(26,148,26));
setFillColor(getReferenceLineTextY1(0),new Color(26,148,26));
setReferenceLineValueY1(0,400);
setrefernce
setLineWidth(getReferenceLineY1(0),2);
setLineBasicStrokeType(getReferenceLineY1(0),0);
setDisplay(getReferenceLineTextY1(0),true);

setReportParsingErrors(false);
setSelectionEnableMove(false);
setScaleMinAuto(getY1Axis(),true);
setScaleMustIncludeZero(getY1Axis(),false);
*GRAPH_JS_FINAL
"pieProperties": {
    "holeSize": "0%"
},
"blaProperties": {
    "seriesLayout": "absolute"
},
"agnosticSettings": {
    "chartTypeFullName": "Line_Absolute"
}

*END
ENDSTYLE
END

-RUN



Thank you!

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


WebFOCUS 8201, SP 0.1, Windows 7, HTML
September 28, 2018, 01:27 PM
FP Mod Chuck
Shingles

I do not see any additional options for a reference line. Tooltips can be added to markers but not reference lines.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
October 02, 2018, 11:36 AM
Doug
You can add a label to the reference line using:
setTextString(getReferenceLineTextY1(0),"Reference: 400");
or associate it with one of the summed fields using:
COLUMN=N2, ITEM=1, GRAPH-COMMAND='setReferenceLineValue(getReferenceLineY1(0),$VALUE)', $