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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
Trend Lines
 Login/Join
 
<Thariq>
posted
HI,
PLease provide me a solution ??I am able to create linear trend line calculated by Ordinary Least Squares (OLS) regression analysis by setting the gtrend to ON status.Could anyone tell me how to go ahead and create powerseries trend lines? ie,not a linear trend line, but should be curve type best fitted to the data on to a Scattered Graph.

Thanks!!

Thariq
 
Report This Post
Member
posted Hide Post
Tariq,

Curve fitting in WebFOCUS Graphs is very flexible. Below is a FEX you can run against the CAR file to see an example. After the FEX I have more comments, so be sure to scroll down.

-------- BEGIN FEX --------
-* File CurveFit.FEX
GRAPH FILE CAR
SUM SALES
ACROSS COUNTRY
ON GRAPH SET LOOKGRAPH BAR
ON GRAPH SET GRAPHSTYLE *
setMarkerDisplay(true);
setConnectLineMarkers(false);
setConnectScatterMarkers(false);
setX1LabelDisplay(true);
setX1AxisSide(0);
setX1MajorGridDisplay(true);
setX1MajorGridStyle(0);
setX1MinorGridDisplay(false);
setAxisAssignment(0,0);
setSeriesType(0,0);
setY1LabelDisplay(true);
setY1AxisSide(0);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
setTextFormatPreset(getY1Label(),-1);
setTextFormatPattern(getY1Label(),"#.##");
setPieDepth(0);
setPieFeelerTextDisplay(1);
setPieLabelDisplay(0);
setTextFormatPreset(getPieSliceLabel(),1);
setLegendDisplay(true);
setLegendTextAutofit(true);
setFontSizeAbsolute(getY1Title(),true);
setFontSizeAbsolute(getY1Label(),true);
setFontSizeAbsolute(getY2Title(),true);
setFontSizeAbsolute(getY2Label(),true);
setFontSizeAbsolute(getX1Title(),true);
setO1LabelAutofit(true);
setCurveFitType(0,2);
setCurveFitEquationDisplay(false);
ENDSTYLE
END
----------- END FEX ----------

Notice the last two lines above the ENDSTYLE statement. This is the code that creates the trend line.

Below is some information on the various curve fitting options available to you. To use these you would replace the digit "2" in the setCurveFitType() call above with one of the values below.

CurveFitType
Value Description
0 None
1 Linear regression curve fit line
2 Quadratic curve fit line
3 Polynomial fit line
4 Hyperbolic curve fit line
5 Logarithmic curve fit line
6 Modified hyperbolic
7 Rational curve fit line
8 Exponential curve fit line
9 Modified exponential
10 Logarithmic/Quadratic curve fit line
11 Geometric curve fit line

I hope this proves helpful,
--WebFOCUS Product Management
 
Posts: 20 | Location: IBI Corporate HQ, NY | Registered: May 13, 2003Report This Post
<Thariq>
posted
Thanks a lot Larry!! It really works.But I do have more questions on the topic.

I plotted diffrent points with respect to X and Y axis and created a Geometric curve fit
trend line.My question is How will we plot the points in the scatter graph with different legends(colors) based on a third field other than the x and y axis ie I want to segregate the points with respect to the third field.For e.g.: The table has three fields- Customer, Volume and Price. We have price and volume in the x and y axis respectively. Based on customer the color of the points should vary in the scatter graph.

My real question comes.As per your suggestion I was able to generate trend line (Geometric curve fit line)with respect to X any Y (ie price and volume),what should be done to get the same earlier trend line that we generated as it is even after if I segregate the points with respect to the third field(customer).My doubt is will the trend lines be generated as per the segregation for each customer??

Thanks

Thariq


quote:
Originally posted by Larry Eiss:
[qb] Tariq,

Curve fitting in WebFOCUS Graphs is very flexible. Below is a FEX you can run against the CAR file to see an example. After the FEX I have more comments, so be sure to scroll down.

-------- BEGIN FEX --------
-* File CurveFit.FEX
GRAPH FILE CAR
SUM SALES
ACROSS COUNTRY
ON GRAPH SET LOOKGRAPH BAR
ON GRAPH SET GRAPHSTYLE *
setMarkerDisplay(true);
setConnectLineMarkers(false);
setConnectScatterMarkers(false);
setX1LabelDisplay(true);
setX1AxisSide(0);
setX1MajorGridDisplay(true);
setX1MajorGridStyle(0);
setX1MinorGridDisplay(false);
setAxisAssignment(0,0);
setSeriesType(0,0);
setY1LabelDisplay(true);
setY1AxisSide(0);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
setTextFormatPreset(getY1Label(),-1);
setTextFormatPattern(getY1Label(),"#.##");
setPieDepth(0);
setPieFeelerTextDisplay(1);
setPieLabelDisplay(0);
setTextFormatPreset(getPieSliceLabel(),1);
setLegendDisplay(true);
setLegendTextAutofit(true);
setFontSizeAbsolute(getY1Title(),true);
setFontSizeAbsolute(getY1Label(),true);
setFontSizeAbsolute(getY2Title(),true);
setFontSizeAbsolute(getY2Label(),true);
setFontSizeAbsolute(getX1Title(),true);
setO1LabelAutofit(true);
setCurveFitType(0,2);
setCurveFitEquationDisplay(false);
ENDSTYLE
END
----------- END FEX ----------

Notice the last two lines above the ENDSTYLE statement. This is the code that creates the trend line.

Below is some information on the various curve fitting options available to you. To use these you would replace the digit "2" in the setCurveFitType() call above with one of the values below.

CurveFitType
Value Description
0 None
1 Linear regression curve fit line
2 Quadratic curve fit line
3 Polynomial fit line
4 Hyperbolic curve fit line
5 Logarithmic curve fit line
6 Modified hyperbolic
7 Rational curve fit line
8 Exponential curve fit line
9 Modified exponential
10 Logarithmic/Quadratic curve fit line
11 Geometric curve fit line

I hope this proves helpful,
--WebFOCUS Product Management [/qb]
 
Report This Post
Silver Member
posted Hide Post
Does anyone know how to draw trend lines on stark bar graph ?? I can put trendline on simple bar graph but the same commands don't put trendlines on stack bar graph.

Here is an example of my graph..
-*
GRAPH FILE CAR
SUM RETAIL_COST DEALER_COST SALES
ACROSS COUNTRY
ON GRAPH SET LOOKGRAPH VBRSTK1
ON GRAPH SET GRAPHSTYLE *
setMarkerDisplay(true);
setConnectLineMarkers(false);
setConnectScatterMarkers(false);
setX1LabelDisplay(true);
setX1AxisSide(0);
setX1MajorGridDisplay(true);
setX1MajorGridStyle(0);
setX1MinorGridDisplay(false);
setAxisAssignment(0,0);
setSeriesType(0,0);
setY1LabelDisplay(true);
setY1AxisSide(0);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
setTextFormatPreset(getY1Label(),-1);
setTextFormatPattern(getY1Label(),"#.##");
setPieDepth(0);
setPieFeelerTextDisplay(1);
setPieLabelDisplay(0);
setTextFormatPreset(getPieSliceLabel(),1);
setLegendDisplay(true);
setLegendTextAutofit(true);
setFontSizeAbsolute(getY1Title(),true);
setFontSizeAbsolute(getY1Label(),true);
setFontSizeAbsolute(getY2Title(),true);
setFontSizeAbsolute(getY2Label(),true);
setFontSizeAbsolute(getX1Title(),true);
setO1LabelAutofit(true);
setCurveFitType(0,2);
setCurveFitEquationDisplay(false);
ENDSTYLE
END


-Yogesh Patel
------------------------------------------------------------------------
PROD: WF 764 on Linux Apache tomcat v5.5
DEV: WF 768 on Linux
 
Posts: 42 | Location: Edison, New Jersey | Registered: January 30, 2007Report This Post
Virtuoso
posted Hide Post
What should be the basic value for the trend analyzes? The sum of the stacked value, or the individual values (that would give several trends)

What you can do, is calculate the wanted trend in the fex that collects the data and ad that line as an extra field in the graph. (not stacked)




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Silver Member
posted Hide Post
We want to show three trend lines for three summed values that we see stack'd on graph. Basically a trend line for each field, we don't want to show a line that touches high point of a field for each conuntry etc. We want a true tren line for each of the three fields we summ.


quote:
Originally posted by FrankDutch:
What should be the basic value for the trend analyzes? The sum of the stacked value, or the individual values (that would give several trends)

What you can do, is calculate the wanted trend in the fex that collects the data and ad that line as an extra field in the graph. (not stacked)


-Yogesh Patel
------------------------------------------------------------------------
PROD: WF 764 on Linux Apache tomcat v5.5
DEV: WF 768 on Linux
 
Posts: 42 | Location: Edison, New Jersey | Registered: January 30, 2007Report This Post
Virtuoso
posted Hide Post
How about this ?

GRAPH FILE CAR
SUM RETAIL_COST DEALER_COST SALES
ACROSS COUNTRY
ON GRAPH SET LOOKGRAPH MULTI3Y
ON GRAPH SET GRAPHEDIT SERVER
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF
ON GRAPH SET VZERO ON
ON GRAPH SET GRID ON
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET GRAPHSTYLE *
setX1LabelDisplay(true);
setX1AxisSide(0);
setX1MajorGridDisplay(true);
setX1MajorGridStyle(0);
setX1MinorGridDisplay(false);
setPieDepth(0);
setFontSizeAbsolute(getX1Title(),true);
setCurveFitEquationDisplay(false);
setCurveFitType(0,5);
setCurveFitPolynomialOrder(0,3);
setCurveFitType(1,5);
setCurveFitPolynomialOrder(1,3);
setCurveFitType(2,5);
setCurveFitPolynomialOrder(2,3);
setMarkerDisplay(true);
setConnectLineMarkers(false);
setConnectScatterMarkers(false);
setO1LabelDisplay(true);
setO1AxisSide(0);
setO1MajorGridDisplay(true);
setO1MajorGridStyle(0);
setO1MinorGridDisplay(false);
setAxisAssignment(0,0);
setAxisAssignment(1,1);
setAxisAssignment(2,2);
setY1LabelDisplay(true);
setY1AxisSide(0);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
setTextFormatPreset(getY1Label(),-1);
setTextFormatPattern(getY1Label(),"#.##");
setPieFeelerTextDisplay(1);
setPieLabelDisplay(0);
setTextFormatPreset(getPieSliceLabel(),1);
setLegendDisplay(true);
setFontSizeAbsolute(getY1Title(),true);
setFontSizeAbsolute(getY1Label(),true);
setFontSizeAbsolute(getY2Title(),true);
setFontSizeAbsolute(getY2Label(),true);
setFontSizeAbsolute(getO1Title(),true);
setPlace(true);
ENDSTYLE




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Silver Member
posted Hide Post
It's a possible option. As soon as I change graph type to 'ON GRAPH SET LOOKGRAPH VBRSTK1'
trend lines disappear, so it seems like trend lines don't appear with stack'd bar graph.

Thanks for your time !!


-Yogesh Patel
------------------------------------------------------------------------
PROD: WF 764 on Linux Apache tomcat v5.5
DEV: WF 768 on Linux
 
Posts: 42 | Location: Edison, New Jersey | Registered: January 30, 2007Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders