[GRAPH-CLOSED] Mouseover of NOPRINT BY field in an AGA Bar Graph
We have a requirement to graph some dollar amounts by month in a stacked vertical bar graph. That part is fairly straightforward so the challenge is the user wants the mouseover to display an individual calendar date (MAX.DATE) together with the dollar amounts in the hovered bar.
Are there some API settings to modify the tooltip settings?
The code with comments and the APIS in place
GRAPH FILE MY_MONEY -* Created by Advanced Graph Assistant SUM MY_MONEY.SEG01.CASHVALUE AS 'cASH' MY_MONEY.SEG01.MARKETVALUE AS 'MARKET SHARES' BY MY_MONEY.SEG01.MONEY_DATE_YYMD NOPRINT >>>>>>>> What the mouseover has to show - points to the MAX.MONEY_DATE_YYMD BY MY_MONEY.SEG01.MONEY_DATE_FORMAL AS ' ' >>>>>>>>>>>>>>>>>>> what the mouseover points to now. WHERE MY_MONEY.SEG01.MONEY_DATE_FORMAL GE '022011'; ON GRAPH PCHOLD FORMAT PNG ON GRAPH SET HTMLENCODE ON ON GRAPH SET GRAPHDEFAULT OFF ON GRAPH SET VZERO OFF ON GRAPH SET HAXIS 750 ON GRAPH SET VAXIS 450 ON GRAPH SET UNITS PIXELS ON GRAPH SET LOOKGRAPH VBRSTK1 ON GRAPH SET GRMERGE ADVANCED ON GRAPH SET GRMULTIGRAPH 0 ON GRAPH SET GRLEGEND 0 ON GRAPH SET GRXAXIS 2 ON GRAPH SET GRAPHSTYLE * setTemplateFile("/images/tdg/template/IBIColorToWhite.txt"); setReportParsingErrors(false); setSelectionEnableMove(false); setTransparentBorderColor(getChartBackground(),true); setFillColor(getSeries(1),new Color(65,105,255)); setTransparentBorderColor(getSeries(0),true); setTransparentBorderColor(getSeries(1),true); setTransparentBorderColor(getSeries(2),true); setTransparentBorderColor(getSeries(3),true); setTransparentBorderColor(getSeries(4),true); setTransparentBorderColor(getSeries(5),true); setTransparentBorderColor(getSeries(6),true); setTransparentBorderColor(getSeries(7),true); setTransparentBorderColor(getSeries(8),true); setTransparentBorderColor(getSeries(9),true); setTransparentBorderColor(getSeries(10),true); setDepthRadius(0); setDepthAngle(0); setFontName(getO1Label(),"Arial"); setTransparentBorderColor(getAllSeries(),true); setFontName(getLegendText(),"Arial"); setTextRotation(getO1Label(),2); setBorderColor(getO1AxisLine(),new Color(0,0,0)); setGridStyle(getO1MajorGrid(),2); setTextFormatPreset(getY1Label(),8); setFontName(getY1Label(),"Arial"); setLegendOrient(1); setFillColor(getSeries(0),new Color(46,139,87)); setFillType(getSeries(0),2); setFillType(getSeries(1),2); setGradientPinPosition(getSeries(0),1.0,2); setGradientNumPins(getSeries(0),2); setGradientPinPosition(getSeries(0),0.0,0); setGradientPinPosition(getSeries(0),1.0,1); setGradientPinLeftColor(getSeries(0),new Color(0,128,64),1); setGradientPinRightColor(getSeries(0),new Color(0,128,64),1); setFontSizeAbsolute(getLegendText(),true); setFontSizeInPoints(getLegendText(),8); setFontStyle(getLegendText(),0); setFontSizeAbsolute(getO1Label(),true); setFontSizeInPoints(getO1Label(),8); setFontStyle(getO1Label(),0); setFontSizeAbsolute(getY1Label(),true); setFontSizeInPoints(getY1Label(),8); setFontStyle(getY1Label(),0); setLineWidth(getO1MajorGrid(),2); setRect(getLegendArea(),new Rectangle(-8533.0,-43151.0,17333.0,31515.0)); setLegendPosition(1); setLegendAutomatic(true); setPlace(true); ENDSTYLE END
First prize gets a free tour of Disney at Summit 2012
Thank you, Focus NationThis message has been edited. Last edited by: S.J. Kadish,
This may help, but only work for me in GRAPHEDIT OFF.
I've set all the objects that I could find that setUserToolTip supports.
GRAPH FILE EMPLOYEE
SUM CNT.EMP_ID
ACROSS HIRE_DATE
ON GRAPH SET LOOKGRAPH VBAR
-* ON GRAPH SET GRAPHEDIT SERVER
ON GRAPH SET GRAPHEDIT OFF
ON GRAPH SET GRAPHSTYLE *
-* User Tooltip
setToolTipMode(false);
setUserToolTip("Object Name:[ON][R]Object ID:[OID][R]Object Instance:[OIN][R]Object Description:[OD][R]Series Label:[SL][R]Group Label:[GL][R]X Value:[XV][R]Y Value:[YV][R]Z Value:[ZV]");
-* Alternate Frames
setDisplay(getO1AltFmtFrame(), true);
setAltFmtFrameNumColors(getO1AltFmtFrame(), 2);
setAltFmtFrameSeparator(getO1AltFmtFrame(0), 5.0);
setDisplay(getO1AltFmtFrame(0), true);
setDisplay(getO1AltFmtFrame(1), true);
setFillColor(getO1AltFmtFrame(0), new Color(255,221,221));
setFillColor(getO1AltFmtFrame(1), new Color(221,255,221));
-* Annotation 1
setDisplay(getAnnotation(0), true);
setTextString(getAnnotation(0), "Jan-Jun");
setFillColor(getAnnotation(0), new Color(128,0,0));
setRect(getAnnotation(0),new Rectangle(-14000,11000,9000,1800));
setFontSizeAbsolute(getAnnotation(0),true);
setFontSizeInPoints(getAnnotation(0),15.0);
-* Annotation 2
setDisplay(getAnnotation(1), true);
setTextString(getAnnotation(1), "Jul-Dec");
setFillColor(getAnnotation(1), new Color(0,128,0));
setRect(getAnnotation(1),new Rectangle(0,11000,15000,1800));
setFontSizeAbsolute(getAnnotation(1),true);
setFontSizeInPoints(getAnnotation(1),15.0);
ENDSTYLE
END
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
February 24, 2012, 08:02 AM
gregv
Very interesting graph addition! Thanks Waz.
FYI: With 7.7.03, if I change the User Tooltip section to show HIRE_DATE then the background colors do not show up but if I place this section at the end of the style section then the colors display.
Good stuff and cheap too.
Greg
current client: WF 8.1.05 & 8.2 - Windows 7 64bit - Tomcat 7 - MRE / BID - IE11
Thanks to all who replied. The specifications seem to be somewhat elusive so I will apply what Waz suggested once we get the users' updated requirements.