Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Embedding WebFOCUS Sparkline Chart
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] Embedding WebFOCUS Sparkline Chart
 Login/Join
 
Member
posted
Does anyone have an example of how the WebFOCUS provided sparkline chart can be embedded in a table or text?

The documentation says it can but doesn't provide an example.

Thanks in advance.

This message has been edited. Last edited by: FP Mod Chuck,
 
Posts: 2 | Registered: November 29, 2018Reply With QuoteReport This Post
Expert
posted Hide Post
Hi Ben, and welcome to FP.

Example code using GGSALES sample data
EMBED BEGIN PCHOLD FORMAT HTML
EMBED COMPONENT AS SPARK
DEFINE FILE GGSALES
  YEAR/YY = DATE;
END
GRAPH FILE GGSALES
SUM DOLLARS AS ''
BY CATEGORY AS ''
BY PRODUCT AS ''
ACROSS DATE AS ''
WHERE YEAR EQ 1997
ON GRAPH PCHOLD AS SPARK FORMAT JSCHART
ON GRAPH SET LOOKGRAPH BAR
ON GRAPH SET HAXIS 200
ON GRAPH SET VAXIS 50
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 2
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET STYLE *
*GRAPH_JS
chartType: 'sparkline',
title: {visible: false},
xaxis: {
    majorGrid: {
                   visible: false
    }
},
yaxis: {
    majorGrid: {
                   visible: false
    }
},
border: {width: 0},
blaProperties:{ lineConnection: 'curved'},
END

EMBED MAIN
TABLE FILE GGSALES
SUM DOLLARS
COMPUTE SparkLine/A1=' ';
BY CATEGORY
BY PRODUCT
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET STYLE *
type=report, border=light, $
type=data, column=SparkLine, embed=spark, size=3, $
END
EMBED END
-RUN


T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, 8.2.02M, 8.2.03, 8.2.04 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.04 standalone on Windows 10 
 
Posts: 5441 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Member
posted Hide Post
Awesome! Works like a charm. Is this documented anywhere?
 
Posts: 2 | Registered: November 29, 2018Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Hi Tony,
Very nice. One learns something every day!
As Ben asks: where is the documentation.


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1906 | Location: Tel Aviv, Israel | Registered: March 23, 2006Reply With QuoteReport This Post
Expert
posted Hide Post
quote:
EMBED MAIN

Excellent Tony... Excellent (As expected)



In FOCUS Since 1983 ~ from PC FOCUS to WebFOCUS 8204M Gen48
 
Posts: 2711 | Location: Nashville TN Area [Test:8204Mg48/Prod:8202Mg60] | Registered: February 23, 2005Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Embedding WebFOCUS Sparkline Chart

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.