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] reference line on bar graph

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] reference line on bar graph
 Login/Join
 
Platinum Member
posted
i have the following code on simple car file graph. I would like the reference line to be on the right side of england and not in the center, how do i do that.?



 

GRAPH FILE CAR
-* Created by Advanced Graph Assistant
SUM CAR.BODY.DEALER_COST
BY CAR.ORIGIN.COUNTRY
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET HAXIS 770
ON GRAPH SET VAXIS 405
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET GRAPHSTYLE *
setTemplateFile("/images/tdg/template/IBISouthWestern.txt");
setReportParsingErrors(false);
setSelectionEnableMove(false);
setDepthRadius(5);
setCurveFitEquationDisplay(false);
setTransparentBorderColor(getChartBackground(),true);
setTransparentBorderColor(getSeries(0),true);
setTransparentBorderColor(getSeries(1),true);
setTransparentBorderColor(getSeries(2),true);
setTransparentBorderColor(getSeries(3),true);
setTransparentBorderColor(getSeries(4),true);
setTransparentBorderColor(getSeries(5),true);
setTransparentBorderColor(getSeries(6),true);
setTransparentBorderColor(getSeries(7),true);
setTransparentBorderColor(getSeries(8),true);
setTransparentBorderColor(getSeries(9),true);
setTransparentBorderColor(getSeries(10),true);
setPlace(true);
setReferenceLine(getO1Axis(),0,1);
setLineWidth(getReferenceLine(getO1Axis(),0),3);
setFillColor(getReferenceLine(getO1Axis(),0),new Color(255,0,0));
setReferenceTextPosition(getReferenceLineTextO1(0),5);
setReferenceLineValueO1(0,2);
ENDSTYLE

END
-RUN




 

This message has been edited. Last edited by: <Kathryn Henning>,


App Studio Version 8202
windows Platform
SQL Server 2008/2012
 
Posts: 183 | Location: TX | Registered: January 22, 2007Report This Post
Virtuoso
posted Hide Post
I don't think that it's possible because your reference line is on the "dimension" part of the graph and it's defaulted to center in this case.

If you have it on a measure, you have more flexibility for positioning:
-SET &MIN = 10000.0;
-SET &MAX = 32000.0;

GRAPH FILE CAR
-* Created by Advanced Graph Assistant
SUM CAR.BODY.DEALER_COST
BY CAR.ORIGIN.COUNTRY
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET HAXIS 770
ON GRAPH SET VAXIS 405
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET GRAPHSTYLE *
setTemplateFile("/images/tdg/template/IBISouthWestern.txt");
setReportParsingErrors(false);
setSelectionEnableMove(false);
setDepthRadius(5);
setCurveFitEquationDisplay(false);
setTransparentBorderColor(getChartBackground(),true);
setTransparentBorderColor(getSeries(0),true);
setTransparentBorderColor(getSeries(1),true);
setTransparentBorderColor(getSeries(2),true);
setTransparentBorderColor(getSeries(3),true);
setTransparentBorderColor(getSeries(4),true);
setTransparentBorderColor(getSeries(5),true);
setTransparentBorderColor(getSeries(6),true);
setTransparentBorderColor(getSeries(7),true);
setTransparentBorderColor(getSeries(8),true);
setTransparentBorderColor(getSeries(9),true);
setTransparentBorderColor(getSeries(10),true);
setPlace(true);
setDisplay(getReferenceLineY1(0),true);
setLineWidth(getReferenceLineY1(0),3);
setReferenceLineValueY1(0,&MIN);
setFillColor(getReferenceLineY1(0),new Color(255,0,0));
setBorderColor(getReferenceLineY1(0),new Color(255,0,0));
setLineBasicStrokeType(getReferenceLineY1(0),12);
setDisplay(getReferenceLineO1(0),false);
setDisplay(getReferenceLineTextY1(0),true);
setTextString(getReferenceLineTextY1(0),"Min");
setReferenceTextPosition(getReferenceLineTextY1(0),2);
setFillColor(getReferenceLineTextY1(0),new Color(255,0,0));

setDisplay(getReferenceLineY1(1),true);
setLineWidth(getReferenceLineY1(1),3);
setReferenceLineValueY1(1,&MAX);
setBorderColor(getReferenceLineY1(1),new Color(0,255,0));
setFillColor(getReferenceLineY1(1),new Color(0,255,0));
setLineBasicStrokeType(getReferenceLineY1(1),12);
setDisplay(getReferenceLineO1(1),false);
setDisplay(getReferenceLineTextY1(1),true);
setTextString(getReferenceLineTextY1(1),"Max");
setReferenceTextPosition(getReferenceLineTextY1(1),2);
setFillColor(getReferenceLineTextY1(1),new Color(0,255,0));
ENDSTYLE

END
-RUN



WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Platinum Member
posted Hide Post
Hi Martin,
I know how to set a reference line on the Y axis when it has a measure or a value field. I want to know if there is a way to place it at a specific position on xaxis when the field has text in it. ???

This message has been edited. Last edited by: getit,


App Studio Version 8202
windows Platform
SQL Server 2008/2012
 
Posts: 183 | Location: TX | Registered: January 22, 2007Report This Post
<nick z>
posted
Hi,
Unfortunately there is no way to set a reference line to the right or left of the X axis group.
It will always be in the center.
However,
May I suggest using Alternate Frames?
What you can do is set 2 Alternate frames and make them transparent, you can then add a border on those frames and it will appear as a line between your groups.
What you can do next is set a reference line on the next group and again make it transparent, but this will allow you to enter text to the left of it and it will appear to be the text for the border line.
The drawback is that you can't set the color of that border line to be red like in your example, because your entire frame border will change to red.

Here is an example I put together from your code:

 
GRAPH FILE CAR
-* Created by Advanced Graph Assistant
SUM CAR.BODY.DEALER_COST
BY CAR.ORIGIN.COUNTRY
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET HAXIS 770
ON GRAPH SET VAXIS 405
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET GRAPHSTYLE *
setTemplateFile("/images/tdg/template/IBISouthWestern.txt");
setReportParsingErrors(false);
setSelectionEnableMove(false);
setDepthRadius(5);
setCurveFitEquationDisplay(false);
setTransparentBorderColor(getChartBackground(),true);
setTransparentBorderColor(getSeries(0),true);
setTransparentBorderColor(getSeries(1),true);
setTransparentBorderColor(getSeries(2),true);
setTransparentBorderColor(getSeries(3),true);
setTransparentBorderColor(getSeries(4),true);
setTransparentBorderColor(getSeries(5),true);
setTransparentBorderColor(getSeries(6),true);
setTransparentBorderColor(getSeries(7),true);
setTransparentBorderColor(getSeries(8),true);
setTransparentBorderColor(getSeries(9),true);
setTransparentBorderColor(getSeries(10),true);
setPlace(true);
-*setReferenceLine(getO1Axis(),0,1);
-*setLineWidth(getReferenceLine(getO1Axis(),0),3);
-*setFillColor(getReferenceLine(getO1Axis(),0),new Color(255,0,0));
-*setReferenceTextPosition(getReferenceLineTextO1(0),5);
-*setReferenceLineValueO1(0,2);


setDisplay(getO1AltFmtFrame(),true);
setDisplay(getO1AltFmtFrame(2),false);
setDisplay(getO1AltFmtFrame(3),false);
setDisplay(getO1AltFmtFrame(4),false);
setAltFmtFrameSeparator(getY1AltFmtFrame(0),1.0);
setDisplay(getO1AltFmtFrame(1),true);
setAltFmtFrameNumColors(getO1AltFmtFrame(),2);
setAltFmtFrameSeparator(getO1AltFmtFrame(0),0.5);
setFillColor(getO1AltFmtFrame(1),new Color(255,255,255,0));
setFillColor(getO1AltFmtFrame(0),new Color(255,255,255,0));
setBorderColor(getO1AltFmtFrame(0),new Color(0,0,0));
setBorderColor(getO1AltFmtFrame(1),new Color(0,0,0));

setReferenceTextPosition(getReferenceLineTextO1(0),3);
setDisplay(getReferenceLineO1(0),true);
setBorderColor(getReferenceLineO1(0),new Color(255,0,0,0));
setFillColor(getReferenceLineTextO1(0),new Color(255,0,0,0));
setReferenceLineValueO1(0,1.0);
setLineWidth(getReferenceLineO1(0),1);
setLineBasicStrokeType(getReferenceLineO1(0),0);
setTextString(getReferenceLineTextO1(0),"MyText");
setDisplay(getReferenceLineTextO1(0),true);

setDepthRadius(0);



ENDSTYLE
END

-RUN


Hope this helps.

Thanks.
Nick.
 
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     [SOLVED] reference line on bar graph

Copyright © 1996-2020 Information Builders