As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
Hi, I am able to produce sparkline using the code below. I am having trouble figuring out how to change the tooltip/mouseover to show the value of the "DATE" field along with the value.
TABLE FILE GGSALES
SUM DOLLARS
BY PRODUCT
BY ST
BY DATE
IF ST EQ 'CA'
ON TABLE HOLD AS HLDSALES
END
-RUN
-*
-* Create Sales Report with Sparkline Trend.
-*
DEFINE FILE HLDSALES
DOLLARS_D/D12c = DOLLARS;
DOLLARS_A/A15 = FTOA(DOLLARS_D,'(D12c)','A15');
SAMEROW_YN/A1 = IF ((LAST PRODUCT EQ PRODUCT) AND (LAST ST EQ ST)) THEN 'Y' ELSE 'N';
DOLL_OUT/A4096V = IF SAMEROW_YN EQ 'N' THEN DOLLARS_A ELSE DOLL_OUT || ',' || DOLLARS_A;
END
-*
TABLE FILE HLDSALES
SUM DOLLARS/D12 AS 'Sales'
COMPUTE SPARK2FLAME/A4096V = '<span class="inlinesparkline">' ||
DOLL_OUT ||
'</span>'; AS 'jQuery Sparkline - Sales Trend Across Time'
BY PRODUCT AS 'Product'
BY ST AS 'State'
IF ST EQ 'CA'
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS HLDREPT FORMAT HTMTABLE
ON TABLE SET HTMLCSS ON
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/ENInformationBuilders_Light1,$
TYPE=HEADING,COLOR='WHITE',BACKCOLOR=RGB(#4F81BD),$
TYPE=TITLE, JUSTIFY=CENTER,$
ENDSTYLE
END
-RUN
-*
-* Present the report page to the user.
-*
-HTMLFORM BEGIN
<!DOCTYPE html>
<html>
-*
<head>
<title>GG Sales Status Reporting</title>
<style>
.block_wrapper{
width: 820px;
}
.innerblock {
float: left;
padding: 10px;
border: 1px solid gray;
}
</style>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript" src="http://omnipotent.net/jquery.sparkline/2.0/jquery.sparkline.js"></script>
<script>
$(function() {
$.fn.sparkline.defaults.common.width = '500px';
$.fn.sparkline.defaults.common.height = '020px';
$('.inlinesparkline').sparkline();
});
</script>
</head>
-*
<body>
<div class="block_wrapper">
<div class="innerblock">
!IBI.FIL.HLDREPT;
</div>
</div>
</body>
</html>
-HTMLFORM END
ThanksThis message has been edited. Last edited by: BM,
WebFOCUS 8202M
Posts: 167 | Location: Montreal | Registered: September 23, 2014
Thanks. I did find this post before I posted the question . Unfortunatly, doesn't give me what I am looking for. Basically, I am looking to overwrite the default tooltip which the value with Date: and Value.
Thanks
WebFOCUS 8202M
Posts: 167 | Location: Montreal | Registered: September 23, 2014
I found this link on techsupport https://techsupport.informatio...track/170217072.html It may give you some guideance for using &variables but to be honest it did not sound promising with 8.1.05. 8.2.01 has much improved tool tip usage.
Thank you for using Focal Point!
Chuck Wolff - Focal Point Moderator WebFOCUS 7x and 8x, Windows, Linux All output Formats
Posts: 2127 | Location: Customer Support | Registered: April 12, 2005
BM, you're using a jQuery plugin, which not really in the realm of WebFOCUS support.
Meanwhile, I took a look at your code. The DATE column is not specified in the code that generates the data for the sparkline so I can't see how it can be displayed in the tooltip.
Francis is offline, BUT, he stated: "The DATE column is not specified in the code that generates the data for the sparkline so I can't see how it can be displayed in the tooltip."
Your showing a DATE in the HOLD file, not not in the ON TABLE HOLD AS HLDREPT FORMAT HTMTABLE table.
Add it in with NOPRINT so it is a available for the tooltip...
Hi, Here is the updated code. I've concatenated all the "DATE"s and called it DATE_OUT. But not sure how to show it as a tooltip. Currently it shows values. I would like to show something like this
Date: 19960101 Value: 27,270
TABLE FILE GGSALES
SUM DOLLARS
BY PRODUCT
BY ST
BY DATE
IF ST EQ 'CA'
ON TABLE HOLD AS HLDSALES
END
-RUN
-*
-* Create Sales Report with Sparkline Trend.
-*
DEFINE FILE HLDSALES
DOLLARS_D/D12c = DOLLARS;
DOLLARS_A/A15 = FTOA(DOLLARS_D,'(D12c)','A15');
SAMEROW_YN/A1 = IF ((LAST PRODUCT EQ PRODUCT) AND (LAST ST EQ ST)) THEN 'Y' ELSE 'N';
DOLL_OUT/A4096V = IF SAMEROW_YN EQ 'N' THEN DOLLARS_A ELSE DOLL_OUT || ',' || DOLLARS_A;
DATE_CONV/A10V=EDIT(FPRINT(DATE, 'I8YYMD', 'A10V'),'9999$99$99');
DATE_OUT/A4096V = IF SAMEROW_YN EQ 'N' THEN DATE_CONV ELSE DATE_OUT || ',' || DATE_CONV;
END
-*
TABLE FILE HLDSALES
SUM DOLLARS/D12 AS 'Sales'
DATE_OUT
COMPUTE SPARK2FLAME/A4096V = '<span class="inlinesparkline">' ||
DOLL_OUT ||
'</span>'; AS 'jQuery Sparkline - Sales Trend Across Time'
BY PRODUCT AS 'Product'
BY ST AS 'State'
IF ST EQ 'CA'
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS HLDREPT FORMAT HTMTABLE
ON TABLE SET HTMLCSS ON
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/ENInformationBuilders_Light1,$
TYPE=HEADING,COLOR='WHITE',BACKCOLOR=RGB(#4F81BD),$
TYPE=TITLE, JUSTIFY=CENTER,$
ENDSTYLE
END
-RUN
-*
-* Present the report page to the user.
-*
-HTMLFORM BEGIN
<!DOCTYPE html>
<html>
-*
<head>
<title>GG Sales Status Reporting</title>
<style>
.block_wrapper{
width: 820px;
}
.innerblock {
float: left;
padding: 10px;
border: 1px solid gray;
}
</style>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript" src="http://omnipotent.net/jquery.sparkline/2.0/jquery.sparkline.js"></script>
<script>
$(function() {
$.fn.sparkline.defaults.common.width = '500px';
$.fn.sparkline.defaults.common.height = '020px';
$('.inlinesparkline').sparkline();
});
</script>
</head>
-*
<body>
<div class="block_wrapper">
<div class="innerblock">
!IBI.FIL.HLDREPT;
</div>
</div>
</body>
</html>
-HTMLFORM END
WebFOCUS 8202M
Posts: 167 | Location: Montreal | Registered: September 23, 2014
Inline: x and y values are separated by a colon: x:y,x:y,x:y - eg.
<span class="linechart">1:3,2.7:4,4.8:3</span>
But this seems to mess up the chart:
-* File: IBFS:/localhost/WFC/Repository/FocalPoint/fp_bm2.fex Created by WebFOCUS AppStudio
-SET &ECHO=ALL;
TABLE FILE GGSALES
SUM DOLLARS
BY PRODUCT
BY ST
BY DATE
IF ST EQ 'CA'
ON TABLE HOLD AS HLDSALES
END
-RUN
-*
-* Create Sales Report with Sparkline Trend.
-*
DEFINE FILE HLDSALES
-*DATE_A/A10 = FPRINT(EDIT(DATE), 'A8YYMD', 'A10');
DATE_A/A8 = EDIT(DATE);
DOLLARS_A/A12 = LJUST(12, FPRINT(DOLLARS,'D12c','A12'), 'A12');
SAMEROW_YN/A1 = IF ((LAST PRODUCT EQ PRODUCT) AND (LAST ST EQ ST)) THEN 'Y' ELSE 'N';
DOLL_OUT/A4096V = IF SAMEROW_YN EQ 'N' THEN DATE_A || ':' || DOLLARS_A ELSE DOLL_OUT || ',' || DATE_A || ':' || DOLLARS_A;
-*DOLL_OUT/A4096V = IF SAMEROW_YN EQ 'N' THEN '''' || DATE_A || ''':' || DOLLARS_A ELSE DOLL_OUT || ',' || '''' || DATE_A || ''':' || DOLLARS_A;
-*DOLL_OUT/A4096V = IF SAMEROW_YN EQ 'N' THEN DOLLARS_A ELSE DOLL_OUT || ',' || DOLLARS_A;
END
-RUN
TABLE FILE HLDSALES
SUM DOLLARS/D12 AS 'Sales'
COMPUTE SPARK2FLAME/A4096V =
'<span class="inlinesparkline">'
|| DOLL_OUT
|| '</span>'; AS 'jQuery Sparkline - Sales Trend Across Time'
BY PRODUCT AS 'Product'
BY ST AS 'State'
IF ST EQ 'CA'
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS HLDREPT FORMAT HTMTABLE
ON TABLE SET HTMLCSS ON
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/ENInformationBuilders_Light1,$
TYPE=HEADING,COLOR='WHITE',BACKCOLOR=RGB(#4F81BD),$
TYPE=TITLE, JUSTIFY=CENTER,$
ENDSTYLE
END
-RUN
-*
-* Present the report page to the user.
-*
-HTMLFORM BEGIN
<!DOCTYPE html>
<html>
-*
<head>
<title>GG Sales Status Reporting</title>
<style>
.block_wrapper{
width: 820px;
}
.innerblock {
float: left;
padding: 10px;
border: 1px solid gray;
}
</style>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript" src="http://omnipotent.net/jquery.sparkline/2.0/jquery.sparkline.js"></script>
<script>
$(function() {
$.fn.sparkline.defaults.common.width = '500px';
$.fn.sparkline.defaults.common.height = '020px';
$('.inlinesparkline').sparkline( 'html', {type: 'line' } );
});
</script>
</head>
-*
<body>
<div class="block_wrapper">
<div class="innerblock">
!IBI.FIL.HLDREPT;
</div>
</div>
</body>
</html>
-HTMLFORM END
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
TABLE FILE HLDSALES
SUM COMPUTE CNTR/I3 = LAST CNTR + 1; NOPRINT
COMPUTE DATEYYMD/YYMD = DATE; NOPRINT
COMPUTE MNTH/A3 = EDIT(DATETRAN(DATEYYMD, '(YYMD)', '(t)', 'en', 12, 'A12'),'$$$$$999$$$'); NOPRINT
COMPUTE LKUP_VAL/A20 = LJUST(3,FPRINT(CNTR - 1,'I3','A3'),'A3')||':'''||MNTH||''',';
BY DATE NOPRINT
WHERE ST EQ 'CA'
ON TABLE SAVE AS LOOKUPS
END
-RUN
T
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
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
Tony and Francis , as usual, you pointed me to a correct direction.
It produces the lookup values that I need but the only problem is that it leaves an extra "comma" in the end. causing the chart to not show up. If I manually delete that comma then it works fine.
Here is my updated code.
-SET &ECHO=ALL;
TABLE FILE GGSALES
SUM DOLLARS
BY PRODUCT
BY ST
BY DATE
IF ST EQ 'CA'
ON TABLE HOLD AS HLDSALES
END
-RUN
-*
-* Create Sales Report with Sparkline Trend.
-*
TABLE FILE HLDSALES
SUM COMPUTE CNTR/I3 = LAST CNTR + 1; NOPRINT
COMPUTE DATE_CONV/A10V=EDIT(FPRINT(DATE, 'I8YYMD', 'A10V'),'9999$99$99');
COMPUTE LKUP_VAL/A20 = LJUST(3,FPRINT(CNTR - 1,'I3','A3'),'A3')||':'''||DATE_CONV||''',';
BY DATE NOPRINT
WHERE ST EQ 'CA'
ON TABLE HOLD AS HLD
END
-RUN
TABLE FILE HLD
BY LKUP_VAL
ON TABLE SAVE AS LOOKUPS
END
-RUN
DEFINE FILE HLDSALES
DOLLARS_D/D12c = DOLLARS;
DOLLARS_A/A15 = FTOA(DOLLARS_D,'(D12c)','A15');
SAMEROW_YN/A1 = IF ((LAST PRODUCT EQ PRODUCT) AND (LAST ST EQ ST)) THEN 'Y' ELSE 'N';
DOLL_OUT/A4096V = IF SAMEROW_YN EQ 'N' THEN DOLLARS_A ELSE DOLL_OUT || ',' || DOLLARS_A;
END
-*
TABLE FILE HLDSALES
SUM DOLLARS/D12 AS 'Sales'
COMPUTE SPARK2FLAME/A4096V = '<span class="inlinesparkline">' ||
DOLL_OUT ||
'</span>'; AS 'jQuery Sparkline - Sales Trend Across Time'
BY PRODUCT AS 'Product'
BY ST AS 'State'
IF ST EQ 'CA'
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS HLDREPT FORMAT HTMTABLE
ON TABLE SET HTMLCSS ON
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/ENInformationBuilders_Light1,$
TYPE=HEADING,COLOR='WHITE',BACKCOLOR=RGB(#4F81BD),$
TYPE=TITLE, JUSTIFY=CENTER,$
ENDSTYLE
END
-RUN
-*
-* Present the report page to the user.
-*
-HTMLFORM BEGIN
<!DOCTYPE html>
<html>
-*
<head>
<title>GG Sales Status Reporting</title>
<style>
.block_wrapper{
width: 820px;
}
.innerblock {
float: left;
padding: 10px;
border: 1px solid gray;
}
</style>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript" src="http://omnipotent.net/jquery.sparkline/2.0/jquery.sparkline.js"></script>
<script>
$(function() {
$.fn.sparkline.defaults.common.height = '020px';
$('.inlinesparkline').sparkline('html',{type: "line",width: '500px',tooltipFormat: '{{offset:offset}} {{y}}',tooltipValueLookups: {'offset': {!IBI.FIL.LOOKUPS;}}
});
});
</script>
</head>
-*
<body>
<div class="block_wrapper">
<div class="innerblock">
!IBI.FIL.HLDREPT;
</div>
</div>
</body>
</html>
-HTMLFORM END
Here is the lookup values it creates. there extra comma at the end of last entry "9:'19961001'" is causing the issue. Is there anyway to get rid of it?
Generally, JSON tolerates the trailing comma. Here's working code that runs in Chrome and IE. (Thanks Tony!)
-SET &ECHO=ALL;
SET HOLDLIST = PRINTONLY
-RUN
TABLE FILE GGSALES
SUM
DOLLARS
BY PRODUCT
BY ST
BY DATE
WHERE ST EQ 'CA'
ON TABLE HOLD AS HLDSALES
END
-RUN
DEFINE FILE HLDSALES
DOLLARS_A/A12 = LJUST(12, FPRINT(DOLLARS,'D12c','A12'), 'A12');
SAMEROW_YN/A1 = IF ((LAST PRODUCT EQ PRODUCT) AND (LAST ST EQ ST)) THEN 'Y' ELSE 'N';
DOLL_OUT/A4096V = IF SAMEROW_YN EQ 'N' THEN DOLLARS_A ELSE DOLL_OUT || ',' || DOLLARS_A;
END
-RUN
TABLE FILE HLDSALES
SUM
DOLLARS/D12 AS 'Sales'
COMPUTE SPARK2FLAME/A4096V =
'<span class="inlinesparkline">'
|| DOLL_OUT
|| '</span>'; AS 'jQuery Sparkline - Sales Trend Across Time'
BY PRODUCT AS 'Product'
BY ST AS 'State'
WHERE ST EQ 'CA'
ON TABLE HOLD AS HLDREPT FORMAT HTMTABLE
ON TABLE SET HTMLCSS ON
ON TABLE SET PAGE NOLEAD
END
-RUN
TABLE FILE HLDSALES
SUM
COMPUTE DATE_YYMD/YYMD = DATE; NOPRINT
COMPUTE CNTR/I3 = LAST CNTR + 1; NOPRINT
COMPUTE LKUP_VAL/A20 = LJUST(3, FPRINT(CNTR - 1, 'I3', 'A3'), 'A3') || ':''' || FPRINT(DATE_YYMD, 'YY-M-D', 'A10') || ' - ' || ''',';
BY DATE NOPRINT
WHERE ST EQ 'CA'
ON TABLE SAVE AS LOOKUPS
END
-RUN
-HTMLFORM BEGIN
<!DOCTYPE html>
<html>
<head>
<title>GG Sales Status Reporting</title>
<style>
.block_wrapper{
width: 820px;
}
.innerblock {
float: left;
padding: 10px;
border: 1px solid gray;
}
</style>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript" src="http://omnipotent.net/jquery.sparkline/2.0/jquery.sparkline.js"></script>
<script>
$(function() {
$.fn.sparkline.defaults.common.width = '500px';
$.fn.sparkline.defaults.common.height = '020px';
$('.inlinesparkline').sparkline( 'html', { type: 'line'
, enableTagOptions: true
, tooltipFormat: '{{offset:offset}} {{y}}'
, tooltipValueLookups: { 'offset': { !IBI.FIL.LOOKUPS; } }
})
});
</script>
</head>
<body>
<div class="block_wrapper">
<div class="innerblock">
!IBI.FIL.HLDREPT;
</div>
</div>
</body>
</html>
-HTMLFORM END
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
Thanks Francis. But unfortunately the code is not working for me it shows the "comma delimited" values but no graph. Please let me know if you would like me to post the image of the result.
Tony, have a great weekend.
WebFOCUS 8202M
Posts: 167 | Location: Montreal | Registered: September 23, 2014
Here is my full and final code. Was able to figure out how to get rid of that "nasty" comma and all good
Thanks Francis and Tony.
-* File: IBFS:/MONTREWFCD01/WFC/Repository/Product_Marketing/Portal/PM_MKTG_BU/Top_Analysis/Procedure4.fex Created by WebFOCUS AppStudio
-SET &ECHO=ALL;
-DEFAULTH &MX_DATE = 'FOC_NONE' ;
SET HOLDLIST = PRINTONLY
-RUN
TABLE FILE GGSALES
SUM
DOLLARS
BY PRODUCT
BY ST
BY DATE
WHERE ST EQ 'CA'
ON TABLE HOLD AS HLDSALES
END
-RUN
DEFINE FILE HLDSALES
DOLLARS_A/A12 = LJUST(12, FPRINT(DOLLARS,'D12c','A12'), 'A12');
SAMEROW_YN/A1 = IF ((LAST PRODUCT EQ PRODUCT) AND (LAST ST EQ ST)) THEN 'Y' ELSE 'N';
DOLL_OUT/A4096V = IF SAMEROW_YN EQ 'N' THEN DOLLARS_A ELSE DOLL_OUT || ',' || DOLLARS_A;
END
-RUN
TABLE FILE HLDSALES
SUM
DOLLARS/D12 AS 'Sales'
COMPUTE SPARK2FLAME/A4096V =
'<span class="inlinesparkline">'
|| DOLL_OUT
|| '</span>'; AS 'jQuery Sparkline - Sales Trend Across Time'
BY PRODUCT AS 'Product'
BY ST AS 'State'
WHERE ST EQ 'CA'
ON TABLE HOLD AS HLDREPT FORMAT HTMTABLE
ON TABLE SET HTMLCSS ON
ON TABLE SET PAGE NOLEAD
END
-RUN
TABLE FILE HLDSALES
SUM MAX.DATE AS MX_DATE
WHERE ST EQ 'CA'
ON TABLE SET ASNAMES ON
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS RR FORMAT ALPHA
END
-RUN
-READFILE RR
TABLE FILE HLDSALES
SUM
COMPUTE DATE_YYMD/YYMD = DATE; NOPRINT
COMPUTE CNTR/I3 = LAST CNTR + 1; NOPRINT
COMPUTE LKUP_VAL/A20 = LJUST(3, FPRINT(CNTR - 1, 'I3', 'A3'), 'A3') || ':''' || FPRINT(DATE_YYMD, 'YY-M-D', 'A10') || ' - ' || ''','; NOPRINT
COMPUTE I_SUBSTR/I2 = ARGLEN(20, LKUP_VAL, I_SUBSTR) ; NOPRINT
COMPUTE LKUP_VAL_NOCOM/A20 = SUBSTR(20, LKUP_VAL, 1, I_SUBSTR-1,I_SUBSTR-1, 'A20') ; NOPRINT
COMPUTE LKUP_VAL_MAX/A20 = IF DATE EQ '&MX_DATE.EVAL' THEN LKUP_VAL_NOCOM ELSE LKUP_VAL ;
BY DATE NOPRINT
WHERE ST EQ 'CA'
ON TABLE SAVE AS LOOKUPS
END
-RUN
-HTMLFORM BEGIN
<!DOCTYPE html>
<html>
<head>
<title>GG Sales Status Reporting</title>
<style>
.block_wrapper{
width: 820px;
}
.innerblock {
float: left;
padding: 10px;
border: 1px solid gray;
}
</style>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript" src="http://omnipotent.net/jquery.sparkline/2.0/jquery.sparkline.js"></script>
<script>
$(function() {
$.fn.sparkline.defaults.common.width = '500px';
$.fn.sparkline.defaults.common.height = '020px';
$('.inlinesparkline').sparkline( 'html', { type: 'line'
, enableTagOptions: true
, tooltipFormat: '{{offset:offset}} {{y}}'
, tooltipValueLookups: { 'offset': { !IBI.FIL.LOOKUPS; } }
})
});
</script>
</head>
<body>
<div class="block_wrapper">
<div class="innerblock">
!IBI.FIL.HLDREPT;
</div>
</div>
</body>
</html>
-HTMLFORM END
WebFOCUS 8202M
Posts: 167 | Location: Montreal | Registered: September 23, 2014
Congrats BM on working it out. Just goes to show that there are posters who really want to learn and try things instead of just asking for the solution
If you think of the comma as a leading comma instead of trailing, then you could achieve the lookups like this -
TABLE FILE HLDSALES
SUM COMPUTE CNTR/I3 = LAST CNTR + 1; NOPRINT
COMPUTE DATEYYMD/YYMD = DATE; NOPRINT
COMPUTE MNTH/A3 = EDIT(DATETRAN(DATEYYMD, '(YYMD)', '(t)', 'en', 12, 'A12'),'$$$$$999$$$'); NOPRINT
COMPUTE LKUP_VAL/A20 = IF CNTR EQ 1 THEN LJUST(3,FPRINT(CNTR - 1,'I3','A3'),'A3')||':'''||MNTH||''''
ELSE ','||LJUST(3,FPRINT(CNTR - 1,'I3','A3'),'A3')||':'''||MNTH||'''';
BY DATE NOPRINT
WHERE ST EQ 'CA'
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE SAVE AS LOOKUPS
END
-RUN
T
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
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
I wonder if there is a way to do the same with "pure" WF, without having to resort to jQuery. I can create sparklines but the tooltip eludes me. The jschart documentation shows that one can create tooltips but the only example it gives is something fixed (see WF80_js_chart.pdf page 3-78).
An example of sparklines using only WF (using an intermediate HOLD file would make this "cleaner"...):
-SET &ECHO=ALL;
-* File Sparkline.fex
APP HOLD BASEAPP
TABLE FILE GGSALES
BY PRODUCT
WHERE ST EQ 'CA';
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE SAVE
END
-RUN
-SET &C=&LINES;
-REPEAT #GIFS FOR &I FROM 1 TO &C;
-READ SAVE,&PRODUCT.&I
GRAPH FILE GGSALES
SUM DOLLARS AS ''
ACROSS DATE AS ''
WHERE PRODUCT EQ '&PRODUCT.&I';
WHERE ST EQ 'CA';
ON GRAPH SET LOOKGRAPH VLINE
ON GRAPH SET HAXIS 350
ON GRAPH SET VAXIS 30
ON GRAPH SET GRAPHEDIT SERVER
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF
ON GRAPH SET VZERO ON
ON GRAPH SET GRID OFF
ON GRAPH HOLD AS SPARK&I FORMAT PNG
ON GRAPH SET GRAPHSTYLE *
setMarkerDisplay(false);
setConnectLineMarkers(true);
setConnectScatterMarkers(true);
setO1LabelDisplay(false);
setO1AxisSide(0);
setO1MajorGridDisplay(false);
setO1MajorGridStyle(0);
setO1MinorGridDisplay(false);
setAxisAssignment(0,0);
setSeriesType(0,2);
setY1LabelDisplay(false);
setY1AxisSide(0);
setY1MajorGridDisplay(false);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
setTextFormatPreset(getY1Label(),-1);
setTextFormatPattern(getY1Label(),"#.##");
setPieFeelerTextDisplay(1);
setPieLabelDisplay(0);
setTextFormatPreset(getPieSliceLabel(),1);
setRiserBorderMode(0);
setSeriesDefaultTransparentBorderColor(false);
setUseSeriesBorderDefaults(false);
setLegendDisplay(false);
setFontSizeAbsolute(getY1Title(),true);
setFontSizeAbsolute(getY1Label(),true);
setFontSizeAbsolute(getY2Title(),true);
setFontSizeAbsolute(getY2Label(),true);
setFontSizeAbsolute(getO1Title(),true);
setPlace(true);
ENDSTYLE
ON GRAPH SET STYLE *
$
ENDSTYLE
END
-#GIFS
-*
DEFINE FILE GGSALES
SPARK/A50=
-REPEAT #SPLINES FOR &I FROM 1 TO &C;
IF (PRODUCT EQ '&PRODUCT.&I') AND (ST EQ 'CA') THEN '<img src=/approot/baseapp/spark&I...png>' ELSE
-#SPLINES
' ';
END
-*
TABLE FILE GGSALES
SUM DOLLARS SPARK AS Spark
BY PRODUCT
WHERE ST EQ 'CA';
END
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006