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] Chart should be simple, but can't figure it out.
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] Chart should be simple, but can't figure it out.
 Login/Join
 
Member
posted
99% of our work is reports but once in a while I am asked to include a chart. I just don't get a lot of exposure to the tools so while I think this should be easy, the solution escapes me now.

I need a simple line chart for revenue over time.

Vertical axis - revenue
Horizontal axis - months of the year (Jan - Dec)

I want 3 lines on the chart, each line representing a year (2018, 2017, 2016).

I can export the data to Excel and get the chart but WF should be able to do this!

Using 8201 InfoAssist+ I have revenue and months set but can't get the chart I need by adding Year into any of the Markers (color, size, tooltip). Matrix options didn't help. I don't want multiple graphs for each year.

I've tried plugging year everywhere it could possibly go and just can't get the chart I want. I must be missing something simple, it can't be this hard!

Would appreciate any suggestions.

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


Dennis Tuttle
WebFOCUS 8.201M
iSeries V7.2
Active, HTML, Excel
 
Posts: 7 | Location: Maryland | Registered: June 01, 2017Reply With QuoteReport This Post
Virtuoso
posted Hide Post
I created this in InfoAssist. Y Axis: Revenue; X Axis: Month; Color: Year.

  

ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
-DEFAULTH &WF_HTMLENCODE=OFF;
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 WF_RETAIL
-* Created by Info Assist for Graph
SUM WF_RETAIL.WF_RETAIL_SALES.REVENUE_US
BY WF_RETAIL.WF_RETAIL_TIME_SALES.TIME_YEAR
BY WF_RETAIL.WF_RETAIL_TIME_SALES.TIME_MTH
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
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 LINE
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT

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

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

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

*END
ENDSTYLE
END

-RUN



WebFOCUS 8203, Unix, Windows
 
Posts: 1333 | Location: New York City | Registered: December 30, 2015Reply With QuoteReport This Post
Member
posted Hide Post
Thank you for the example. It does work, but whatever the difference it was more than just placing the fields.

When I do as you have done and put years into the Color position I still only got a single line. The legend showed a gradient color scale.

So I duplicated my report and copy/pasted your code in everywhere except for my data fields. And I get 3 lines, one for each year.

InfoAssist refuses to open the updated chart. I was hoping to see how the settings were reflected in the editor.

Your code seems about a80% the same as what was generated by InfoAssist for me, so now I can try replacing a few lines at a time to see what exactly makes the difference.

Thanks for your example!

Dennis


Dennis Tuttle
WebFOCUS 8.201M
iSeries V7.2
Active, HTML, Excel
 
Posts: 7 | Location: Maryland | Registered: June 01, 2017Reply With QuoteReport This Post
Expert
posted Hide Post
All you need is to have 5 fields: REVENUE_2018, REVENUE_2017, REVENUE_2016, Month_number, and Month_Alpha.
   
GRAPH FILE WhatEver
SUM REVENUE_2018 REVENUE_2017 REVENUE_2016
BY Month_Number NOPRINT
BY Month_Alpha
END 

The REVENUE_2018# fields are DEFINE'd
 
Posts: 2709 | 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] Chart should be simple, but can't figure it out.

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