Focal Point Banner


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.


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.

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[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: 12 | Location: Maryland | Registered: June 01, 2017Report 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 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report 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: 12 | Location: Maryland | Registered: June 01, 2017Report 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: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

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-2020 Information Builders