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     graph - more then one trend line?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
graph - more then one trend line?
 Login/Join
 
Gold member
posted
Is it possible to have more then one trend line?

I have GTREND ON but when I go to merge 2 graphs because 2 sets of data are the same, not even 1 trend line displays. is it possible to have 2 trendlines for each set of data?

thanks,

Leo
 
Posts: 96 | Location: Winnipeg, Manitoba, Canada | Registered: January 22, 2004Report This Post
<Grzegorz>
posted
Leo,

As it is stated in the documentation, the GTREND option is intended to be used to show the linear regression trend on a simple X-Y scatter plot chart, and it really does not perform very well for multi-series charts (see Example 1 below).
There are at least two possibilities to draw trends on any WebFOCUS charts:

  • Using setCurveFitType(...) method from the "Java GRAPHSTYLE" API (Example 2)
  • Calculating the Trend value in FOCUS, HOLDing the results, and then displaying it just like normal data series. (Example 3).

It looks like the second method is most flexible and convenient
(especially, if you do not need something like "modified hyperbolic regression" etc.).

Hope this helps
Grzegorz



-* Example 1:
DEFINE FILE CENTORD
BYMONTH/YYM = ORDER_DATE;
END
-*
GRAPH FILE CENTORD
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET HAXIS 1000
ON GRAPH SET VAXIS 630
ON GRAPH SET 3D OFF
ON GRAPH SET GTREND ON
SUM LINEPRICE
LINE_COGS
BY BYMONTH AS 'Month'
ON GRAPH SET GRAPHSTYLE *
setLegendDisplay(true);
setLegendTextAutofit(true);
setO1LabelAutoSkip(1);
setCurveFitEquationDisplay(false);
ENDSTYLE
END

* Example 2:
DEFINE FILE CENTORD
BYMONTH/YYM = ORDER_DATE;
END
-*
GRAPH FILE CENTORD
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET HAXIS 1000
ON GRAPH SET VAXIS 630
ON GRAPH SET 3D OFF
SUM LINEPRICE
LINE_COGS
BY BYMONTH AS 'Month'
ON GRAPH SET GRAPHSTYLE *
setLegendDisplay(true);
setLegendTextAutofit(true);
setO1LabelAutoSkip(1);
setCurveFitEquationDisplay(false);
setCurveFitType(0, 1);
setCurveFitType(1, 1);
ENDSTYLE
END

-* Example 3:
DEFINE FILE CENTORD
BYMONTH/YYM = ORDER_DATE;
END
-*
TABLE FILE CENTORD
SUM LINEPRICE
LINE_COGS
BY BYMONTH
ON BYMONTH RECAP TOTREND/D12.2 = FORECAST(LINEPRICE, 1, 0, 'REGRESS');
ON BYMONTH RECAP COTREND/D12.2 = FORECAST(LINE_COGS, 1, 0, 'REGRESS');
ON TABLE HOLD AS CENTHLD
END
-*
GRAPH FILE CENTHLD
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET HAXIS 1000
ON GRAPH SET VAXIS 630
ON GRAPH SET 3D OFF
SUM LINEPRICE AS 'Line Total'
TOTREND AS 'Trend of Line Total'
LINE_COGS AS 'Line Cost'
COTREND AS 'Trend of Line Cost'
BY BYMONTH AS 'Month'
ON GRAPH SET GRAPHSTYLE *
setLegendDisplay(true);
setLegendTextAutofit(true);
setO1LabelAutoSkip(1);
setSeriesType(0, 1);
setSeriesFillColor(0, new Color(0, 255, 255));
setSeriesType(2, 1);
setSeriesFillColor(2, new Color(255, 255, 0));
setSeriesType(1, 2);
setLineWidth(getSeries(1), 2);
setMarkerSize(getSeries(1), 4);
setSeriesFillColor(1, new Color(0, 255, 0));
setSeriesType(3, 2);
setLineWidth(getSeries(3), 2);
setMarkerSize(getSeries(3), 4);
setSeriesFillColor(3, new Color(255, 0, 0));
ENDSTYLE
END

This message has been edited. Last edited by: <Mabel>,
 
Report This Post
Gold member
posted Hide Post
Wow.. that was exactly what I wanted..
now is it possible to control where to put the elements before hand.. say where to place the equations and legend?

thanks,

Leo
 
Posts: 96 | Location: Winnipeg, Manitoba, Canada | Registered: January 22, 2004Report This Post
<Grzegorz>
posted
Perspective for Java (Java GRAPHSTYLE *) API, allows some control over placing and formating various chart elements, but with some limitations as well. There is nothing better, than just to experiment with various properties and methods of the API.
The documentation is available here:
http://documentation.informationbuilders.com/masterinde..._43/javagraphapi.pdf
or
http://www.threedgraphics.com/tdg/products/tools/perspe...va/documentation.asp

Chapter 7. describes various properties to set.
Chapter 8. describes methods to invoke.
Chapter 9. describes the methods returning objects identifiers to pass to the method which require it.
(e.g. getSeries() method returns data series object id, which can be passed to setLineWidth() method).

Hope this helps
Grzegorz
 
Report 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     graph - more then one trend line?

Copyright © 1996-2020 Information Builders