Focal Point
[NFR] Drilldown on Chart Labels

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

August 14, 2018, 12:24 PM
Doug
[NFR] Drilldown on Chart Labels
I'd really like to be able to drilldown on the labels in a chart.

Reference: Mr Gross' post http://forums.informationbuild...1057331/m/1417050186 with the last post stating "However, I am happy to inform you that this is a new feature that will be included with the release of WebFOCUS 8.2.00."

OK, how and where, in AS? I have 'Enable Auto Linking' set in the chart Smiler. But, I don't see 'Auto Link Target' in the report Frowner. Both are opened in the GUI.

-DEFAULT &ModelName = 'Nitro Shock'
-*IA_GRAPH_BEGIN
-*Do not delete or modify the comments below
-* OK, I did delete the comments... for the sake of Focal Point...
-*Do not delete or modify the comments above
DEFINE FILE CAR
 BOGUS_COST/D20.2M=IF MODEL CONTAINS 'DOOR' THEN  -DCOST ELSE DCOST ;
END
ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
-DEFAULTH &WF_HTMLENCODE=ON;
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 BOGUS_COST AS ''
BY CAR.CARREC.MODEL AS ''
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET GRWIDTH 1
ON GRAPH SET AUTOFIT ON
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);
setPlace(true);
setCurveFitEquationDisplay(false);
*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
setReportParsingErrors(false);
setSelectionEnableMove(false);
setDataTextPosition(1);
setFontStyle(getDataText(),3);
setTextRotation(getO1Label(),3);
*END
ENDSTYLE
END
-RUN

-*IA_GRAPH_FINISH

This message has been edited. Last edited by: Doug,




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Currently with Fidelity Investments
August 17, 2018, 02:02 PM
FP Mod Chuck
Doug

I have 8.2.03 installed and the only drill down is on measure. I do not see any options for drill down on labels. I'm sorry!


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
August 20, 2018, 09:40 AM
Doug
Bummer. I hope it'll be there soon. A NFR!!!
August 20, 2018, 09:52 AM
Wep5622
For the record, we have an open NFR for a drilldown on Legend labels. Status is "Product Division", Last updated in December, 2016.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
August 20, 2018, 10:38 AM
Doug
Thanks Wep,
quote:
Last updated in December, 2016.
Maybe 8204? We're on 8202, may go to 8203. But, most likely wait for 8204 (imho)
August 21, 2018, 11:58 PM
TobyMills
Hey guys,

Remember the way it works in the product division. The more cases that get opened asking for the same NFR, the more likely it'll get attention from the PM.

Just sayin - if you want this feature, be sure to open a case asking for it. You can reference the other case that WEP is referring to if you know the case number. That will make it pretty easy for the TSR who owns the case to tie them together and it'll be off their plate pretty quickly so they won't mind much.

Just a thought.

Toby
August 22, 2018, 03:41 AM
Wep5622
That would be Case 73192513


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
August 23, 2018, 03:56 AM
Tony A
Here's some code that you might like to play with. I've included the components that you might like to trap an event for, but commented out most of them. I found this back in June but didn't make a note of where Frowner Anyway, for what it's worth -

-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='405.0';
-DEFAULTH &WF_STYLE_WIDTH='770.0';

-HTMLFORM BEGIN
<!doctype html>
<html lang="en">
	<head>
		<title>Chart Events</title>
		<script type="text/javascript">
			<!--
				function chartEvent(chtObj) {
-*					if (! validName(chtObj.chartObjName)) return false;

					var clickText = chtObj.chartObjName ;
					console.log(chtObj)
					if (typeof chtObj.group != 'undefined') clickText += ' (Group: ' + chtObj.group + ')' ;
					if (typeof chtObj.series != 'undefined') clickText += ' (Series: ' + chtObj.series + ')' ;
					if (typeof chtObj.svgElement != 'undefined') {
						if (chtObj.svgElement.childNodes.length > 0) {
						    clickText += ' (' + chtObj.svgElement.childNodes[0].data + ')' ;
                        }
					}
-* this section will allow you to trap the values when clicking on a riser.
-* However, you might need to play a bit :)
-*					if (typeof chtObj.svgElement != 'undefined') {
-*						if (chtObj.svgElement.tdgtitle_dom.innerText !== "") {
-*						    clickText += ' (' + chtObj.svgElement.tdgtitle_dom.innerText + ')' ;
-*                        }
-*					}
					document.getElementById(chtObj.event.type + 'Evt').innerHTML = clickText ;
				}
				function validName(name) {
					if (name=='xaxisOrdinal-labels') return true ;
					return false ;
				}
			//-->
		</script>
	</head>
	<body>
		<table>
			<tr>
				<td>Click Event:</td>
				<td><div id="clickEvt"></div></td>
			</tr>
			<tr>
				<td>Mouse Over Event:</td>
				<td><div id="mouseoverEvt"></div></td>
			</tr>
			<tr>
				<td>Mouse Out Event:</td>
				<td><div id="mouseoutEvt"></div></td>
			</tr>
		</table>
	</body>
</html>
-HTMLFORM END


GRAPH FILE car
-* Created by Info Assist for Graph
SUM CAR.BODY.DEALER_COST
CAR.BODY.SALES
CAR.BODY.RETAIL_COST
CAR.BODY.SEATS
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 VBAR2AX
-*ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setTitleString("Chart Title");
setSubtitleString("Chart Sub-Title");
setFootnoteString("Chart Footnote");
setY1TitleString("Y1Title");
setY2TitleString("Y2Title");
setO1TitleString("O1Title");
setAxisAssignment(3,1);
setSeriesType(getSeries(3),2);
-*setDisplay(getAnnotation(0), true);
-*setTextString(getAnnotation(0), "annotation0");
-*setRect(getAnnotation(0),new Rectangle(-15340,13000,29850,1800));
-*setDisplay(getAnnotation(1), true);
-*setTextString(getAnnotation(1), "annotation1");
-*setRect(getAnnotation(1),new Rectangle(15340,13000,29850,1800));
-*setDisplay(getReferenceLineY1(0),true);
-*setReferenceLineValueY1(0,80000.0);
-*setLineWidth(getReferenceLineY1(0),2);
*END
*GRAPH_JS
});
chart.registerEvent(chartEvent, 'click', 'background');
-*chart.registerEvent(chartEvent, 'mouseover', 'background');
-*chart.registerEvent(chartEvent, 'mouseout', 'background');
chart.registerEvent(chartEvent, 'click', 'xaxis');
-*chart.registerEvent(chartEvent, 'mouseover', 'xaxis');
-*chart.registerEvent(chartEvent, 'mouseout', 'xaxis');
chart.registerEvent(chartEvent, 'click', 'yaxis');
-*chart.registerEvent(chartEvent, 'mouseover', 'yaxis');
-*chart.registerEvent(chartEvent, 'mouseout', 'yaxis');
chart.registerEvent(chartEvent, 'click', 'y2axis');
-*chart.registerEvent(chartEvent, 'mouseover', 'y2axis');
-*chart.registerEvent(chartEvent, 'mouseout', 'y2axis');
chart.registerEvent(chartEvent, 'click', 'legend');
-*chart.registerEvent(chartEvent, 'mouseover', 'legend');
-*chart.registerEvent(chartEvent, 'mouseout', 'legend');
chart.registerEvent(chartEvent, 'click', 'title');
-*chart.registerEvent(chartEvent, 'mouseover', 'title');
-*chart.registerEvent(chartEvent, 'mouseout', 'title');
chart.registerEvent(chartEvent, 'click', 'subtitle');
-*chart.registerEvent(chartEvent, 'mouseover', 'subtitle');
-*chart.registerEvent(chartEvent, 'mouseout', 'subtitle');
chart.registerEvent(chartEvent, 'click', 'series');
-*chart.registerEvent(chartEvent, 'mouseover', 'series');
-*chart.registerEvent(chartEvent, 'mouseout', 'series');
chart.registerEvent(chartEvent, 'click', 'footnote');
-*chart.registerEvent(chartEvent, 'mouseover', 'footnote');
-*chart.registerEvent(chartEvent, 'mouseout', 'footnote');
-*chart.registerEvent(chartEvent, 'click', 'annotation');
-*chart.registerEvent(chartEvent, 'mouseover', 'annotation');
-*chart.registerEvent(chartEvent, 'mouseout', 'annotation');
-*chart.registerEvent(chartEvent, 'click', 'reference');
-*chart.registerEvent(chartEvent, 'mouseover', 'reference');
-*chart.registerEvent(chartEvent, 'mouseout', 'reference');
-*chart.registerEvent(chartEvent, 'click', 'chart');
-*chart.registerEvent(chartEvent, 'mouseover', 'chart');
-*chart.registerEvent(chartEvent, 'mouseout', 'chart');

chart.set({
*END

INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/ENIADefault_combine.sty,$
TYPE=REPORT, TITLETEXT=JSCHART Events, $
ENDSTYLE
END
-RUN


T

This message has been edited. Last edited by: Tony A,



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
August 24, 2018, 11:48 AM
Doug
Thanks Tony, I'll try that as time and priorities permit.
January 28, 2020, 01:13 PM
rkiran1
How do we pass &variables into the JS


Version 8.2.03
Output : HTML, Excel & PDF