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     [CLOSED] Graph questions - how to change Y axis label

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Graph questions - how to change Y axis label
 Login/Join
 
Gold member
posted
I have a horizontal stacked bar graph with two groups and two series (one series is not displayed) on the x axis (might not care about this)

Currently my y axis is a numeric number from 1 thru some value. My grid lines are by 7's (7 days in a week). I would like to now change the label values of the Y axis, problem is that I can't find a javascript method to set the Y axis labels. Anyone know a way to do this? I can find setGroupLabel() and setSeriesLabe() - these just aren't the labels I need to change.

I'm attempting to build a horizontal stacked bar graph to resemble a gnatt chart. I have the graph, just not the lables right now.

Any suggestions?

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


Laure


Prod: WebFOCUS 7.7.03 - MRE, BID, - WindowsXP - Oracle 9i, SQLServer, DevStudio 7.7.3 - Apache Tomcat , Output: HTML, Excel 2013 and PDF
 
Posts: 78 | Location: Florida | Registered: December 07, 2006Report This Post
Expert
posted Hide Post
This doesn't sound difficult. But, what is the value, and field, now and what do you want to change it to? A code sample, using the CAR file, would be very helpful to help us help you.
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Expert
posted Hide Post
Dialogue Manager? I have an example posted in the Forum someplace.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Expert
posted Hide Post
FYI, Graph type 99 is a Gantt Chart.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Gold member
posted Hide Post
Ginny, in all examples I can find on Focal Point and all documentation I've researched there are javascript methods to change the value of the labels associated with the BY fields which is what I see your code doing with the dialog manager looping. This is not what I want to do. I need to change the label with the field associated with the plotted value (INTVALUE in my sample below.


GRAPH FILE x
PRINT/SUM INTVALUE
BY NAME BY PROJECT
ON GRAPH PCHOLD AS HOLD FORMAT PNG
ON GRAPH PCHOLD AS HOLD FORMAT PNG
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF
ON GRAPH SET VZERO ON
ON GRAPH SET GRID ON
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 2
ON GRAPH SET HAXIS 850
ON GRAPH SET VAXIS 600
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH HBRSTK1
END

I've a horizontal bar graph where the bars length is related to the number of days between two dates. I now want to label the horizontal access with the dates... setgrouplabel and setserieslabel work on the vertical access on a horizontal graph.

I'm working on a code example against IB files. Hopefully will get posted later today.


Laure


Prod: WebFOCUS 7.7.03 - MRE, BID, - WindowsXP - Oracle 9i, SQLServer, DevStudio 7.7.3 - Apache Tomcat , Output: HTML, Excel 2013 and PDF
 
Posts: 78 | Location: Florida | Registered: December 07, 2006Report This Post
Gold member
posted Hide Post
Waz,
you stated that graph type 99 is a gnatt chart. In which release? My documentation states its reserved for future use. Can you point me to some documentation?


Laure


Prod: WebFOCUS 7.7.03 - MRE, BID, - WindowsXP - Oracle 9i, SQLServer, DevStudio 7.7.3 - Apache Tomcat , Output: HTML, Excel 2013 and PDF
 
Posts: 78 | Location: Florida | Registered: December 07, 2006Report This Post
Gold member
posted Hide Post
Here's working code against the car file. The example is nonsence however it should get my point through. Run this code and you essentially see a floating horizontal bar graph that mimics a gnatt chart. The integer values on the horizontal axis which is the graphed value of FIRSTVAL and INTVAL are what I want to now change to date values. Since my code graphs the numbers of days and I know the starting point I can calculate the date values for each grid mark on the horizontal Y axis.

DEFINE FILE CAR 
INTVAL/I5=SEATS + 10;
FIRSTVAL/I3 = INTVAL /1.3 ;
END
TABLE FILE CAR
SUM
     INTVAL  FIRSTVAL
BY COUNTRY
BY CAR
ON TABLE HOLD AS HOLDCAR FORMAT FOCUS
END				   			
GRAPH FILE HOLDCAR
SUM FIRSTVAL AS '' INTVAL AS 'DATE RANGE'
BY COUNTRY AS ''
BY CAR  AS ''
ON GRAPH SET LOOKGRAPH HBRSTK1
ON GRAPH SET GRAPHEDIT SERVER
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF
ON GRAPH SET VZERO ON
ON GRAPH SET GRID OFF
-*ON GRAPH SET GRMERGE ON

ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 2
ON GRAPH SET HAXIS 850
ON GRAPH SET VAXIS 600
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH HBRSTK1


ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET GRAPHSTYLE *
setMarkerDisplay(true);
setConnectLineMarkers(false);
setConnectScatterMarkers(false);
setO1LabelDisplay(true);
setO1AxisSide(0);
setO1MajorGridDisplay(true);
setO1MajorGridStyle(0);
setO1MinorGridDisplay(false);
setAxisAssignment(0,0);
setSeriesType(0,1);
setY1LabelDisplay(true);
setY1AxisSide(0);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
setTextFormatPreset(getY1Label(),-1);
setTextFormatPattern(getY1Label(),"#.##");
setPieFeelerTextDisplay(1);
setPieLabelDisplay(0);
setTextFormatPreset(getPieSliceLabel(),1);
setRiserBorderMode(1);
setSeriesDefaultTransparentBorderColor(true);
setUseSeriesBorderDefaults(true);
setLegendDisplay(true);
setFontSizeAbsolute(getY1Title(),true);
setFontSizeAbsolute(getY1Label(),true);
setFontSizeAbsolute(getY2Title(),true);
setFontSizeAbsolute(getY2Label(),true);
setFontSizeAbsolute(getO1Title(),true);
setPlace(true);

setFillColor(getSeries(0),new Color(255,255,255));
setBorderColor(getSeries(0),new Color(255,255,255));
setTransparentBorderColor(getSeries(0),true);
setTransparentFillColor(getSeries(0),true);
ENDSTYLE
END


Laure


Prod: WebFOCUS 7.7.03 - MRE, BID, - WindowsXP - Oracle 9i, SQLServer, DevStudio 7.7.3 - Apache Tomcat , Output: HTML, Excel 2013 and PDF
 
Posts: 78 | Location: Florida | Registered: December 07, 2006Report This Post
Expert
posted Hide Post
Laure, it seems that IBI have decided not to directly support Gantt charts.

If you are to use them you will have to manually create the chart commands.

Probably not a good idea.

As mentioned in this forum many times, the charting engine is supplied by Threedgraphics.com.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Gold member
posted Hide Post
Waz, this is why I was using a historogram (horizontal bar graph). My question is not how to create a gnatt chart, but how to set the label for the Y1 axis on a horitzontal graph as setSeriesLabel and setGroupLabel work on the X axis of a horizontal graph.


Laure


Prod: WebFOCUS 7.7.03 - MRE, BID, - WindowsXP - Oracle 9i, SQLServer, DevStudio 7.7.3 - Apache Tomcat , Output: HTML, Excel 2013 and PDF
 
Posts: 78 | Location: Florida | Registered: December 07, 2006Report This Post
Expert
posted Hide Post
As the Y1 axis is numeric based, then I don't think so.

Perhaps yopu could turn off the display of the Y1 values and put your own text there instead ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
<JG>
posted
Waz is quite correct,

About the only option you have is to turn off the Y1 labels using setY1LabelDisplay(false);
and insert the labels you want as annotations using calls like

setDisplay(getAnnotationBox(0), true);
setDisplay(getAnnotation(0), true);
setFontSizeAbsolute(getAnnotation(0),true);
setFontSize(getAnnotation(0),10);
setFontStyle(getAnnotation(0), 0);
setTextString(getAnnotation(0), "&D1");
setTransparentBorderColor(getAnnotationBox(0), true);
setRect(getAnnotation(0), new Rectangle (-6000, -22000, 4800,10000));

Once you have found the base point for for first label you only need adjust the
horizontal values for each subsequent one. In this example the -6000.

Create the label text as a variable for example &D1 etc.

By default you can add a maximum of 30 labels using this method if you need more
add setMaxNumAnnotations(n); where n is the maximum number that you need.
 
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     [CLOSED] Graph questions - how to change Y axis label

Copyright © 1996-2020 Information Builders