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.
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,
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, 2005
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.
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?
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
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.
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
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.