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 don't understand why my code produces a graph where the Y-axis measure range is much larger than the data being represented.
The test fex using the CAR file produces the graph I expect. The real world fex does not.
I tried commenting most of the "graph style", but I still get a graph I don't expect - with an almost straight lines because the Y-axis range is so large.
Any ideas?
Thanks.
GRAPH FILE CAR
SUM
SALES AS ''
BY WHEELBASE AS ''
-*ON GRAPH HOLD AS REPORT FORMAT HTMTABLE
ON GRAPH SET HAXIS 780
ON GRAPH SET VAXIS 130
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH VLINE
ON GRAPH SET GRMERGE ON
-*ON GRAPH SET HTMLENCODE ON
-*ON GRAPH SET GRAPHDEFAULT OFF
-*ON GRAPH SET VZERO OFF
-*ON GRAPH SET GRMULTIGRAPH 0
-*ON GRAPH SET GRLEGEND 0
-*ON GRAPH SET GRXAXIS 1
-* Custom tooltips are only supported when using the applet (GRAPHEDIT OFF)
-* https://techsupport.informatio...om/sps/51322544.html
-*ON GRAPH SET GRAPHEDIT OFF
ON GRAPH SET GRAPHSTYLE *
setReportParsingErrors(false);
setSelectionEnableMove(false);
setTemplateFile("/images/tdg/template/IBIDefault.txt");
setRect(getFrame(), new Rectangle(-14000,-9000,32000,32000)); // Set the graph display area - (-16000, -16000, 32000, 32000 - entire canvas)
-*setDepthAngle(0); // Turn off 2.5D
setDepthRadius(0); // Turn off 2D
setTransparentBorderColor(getChartBackground(),true); // apply a transparent border color to an object
setPlace(true);
setFontName(getAllText(),"Calibri");
-* X label -------------------------------------------------
setExcludeMinLabel(getO1Label(),false); // include the minimum label
setPlaceResize(getO1Label(),0); // allow font size resize
setFontSizeAbsolute(getO1Label(),true); // assign absolute font sizing
setFontSizeInPoints(getO1Label(),8); // set font size
setFillColor(getO1Label(),new Color(17,94,103)); // set font color
setTextRotation(getO1Label(),0); // set text rotation: 0 (none), 1 (90 degrees), 2 (270 degrees), 3 (45 degrees)
setAutoSkip(getO1Label(),2); // sets or disables label skip for labels
setPlaceSkip(getO1Label(),0);
setSkipBegin(getO1Label(),0); // sets the first label to skip
setSkipCount(getO1Label(),3); // sets the interval of labels to skip after setSkipBegin()
-* Y label -------------------------------------------------
setExcludeMinLabel(getY1Label(),true); // exclude the minimum label
setPlaceResize(getY1Label(),0); // allow font size resize
setFontSizeAbsolute(getY1Label(),true); // assign absolute font sizing
setFontSizeInPoints(getY1Label(),8); // set font size
setFillColor(getY1Label(),new Color(17,94,103)); // set font color
setTextFormatPreset(getY1Label(),9); // assign a number format - 9 = (show M for Millions)
-*setAutoSkip(getY1Label(),20); // sets or disables label skip for labels
-*setSkipBegin(getY1Label(),0); // when setAutoSkip() selects manual skip mode, this method selects the first label to skip
-*setSkipCount(getY1Label(),20); // when setAutoSkip() selects manual skip mode, this method selects the interval of labels to skip after setSkipBegin()
-* Lines and markers ---------------------------------------
-*setMarkerSizeDefault(50); // define the size of markers in a 2D graph
-*setUseSeriesShapes(true); // enable or disable the use of different shapes for each series in the legend
setFillColor(getSeries(0),new Color(0,127,192)); // set series 0 line color
setMarkerDisplay(true); // enable or disable the display of markers
setMarkerShape(getSeries(0),2); // set marker shape
setMarkerSize(0,0) // set marker size
-*setSmoothLines(true);
-* These three settings are required to have small markers which allows the tooltip for the last dimension to display
setUseSeriesBorderDefaults(true);
setSeriesDefaultBorderColor(new Color(0,127,192));
setSeriesDefaultTransparentBorderColor(true);
setExtendToFrameEdge(false); // enable or disable extension of the risers to the graph frame edge
setLineWidth(getSeries(0),5); // define the thickness of a line object
-* Title ---------------------------------------------------
setTextString(getTitle(),"Car Test"); // define a text string to be assigned to the title
setDisplay(getTitle(),true); // set the display attribute of the title
setPlaceResize(getTitle(),0); // allow font size resize
setFontSizeAbsolute(getTitle(),true); // assign absolute font sizing
setFontSizeInPoints(getTitle(),9); // set font size
setFillColor(getTitle(),new Color(0,100,106)); // set font color
-* Legend --------------------------------------------------
setLegendDisplay(false); // enable or disable drawing of the legend box
-* Footnote ------------------------------------------------
-*setDisplay(getFootnote(),false);
-*setFontStyle(getFootnote(),0);
-*setPlaceResize(getFootnote(),0);
-* Grid lines ----------------------------------------------
setBorderColor(getFrame(),new Color(79,157,190));
setBorderColor(getY1MajorGrid(),new Color(79,157,190));
setBorderColor(getO1MajorGrid(),new Color(220,220,220));
setBorderColor(getO1AxisLine(),new Color(79,157,190));
setBorderColor(getY1AxisLine(),new Color(79,157,190));
-*setFillColor(getY1MajorGrid(),new Color(0,0,0));
-*setDisplay(getY1MajorGridColorBand1(),true);
-*setFillColor(getY1MajorGridColorBand1(),new Color(242,247,247));
setDisplay(getY1MajorGridColorBand2(),true);
setFillColor(getY1MajorGridColorBand2(),new Color(229,239,240));
-*setGridStyle(getY1MajorGrid(),1);
-*setLineWidth(getY1MajorGrid(),0);
-*setLineBasicStrokeType(getY1MajorGrid(),0);
-*setMajorGridDrawEveryCount(getY1MajorGrid(),1);
-*setGridStepAuto(getY1MajorGrid(),false);
-*setFillColor(getSeries(0),new Color(194,163,3));
-*setFillColor(getSeries(1),new Color(54,59,116));
-*setFillColor(getFrame(),new Color(245,241,229));
-*setDisplay(getY1ZeroLine(),true);
-*setLineWidth(getY1ZeroLine(),1);
-*setBorderColor(getY1ZeroLine(),new Color(0,0,0));
-*setFillColor(getY1ZeroLine(),new Color(0,0,0));
-*setLineWidth(getSeries(0),2);
-*setLineWidth(getSeries(1),2);
-* Custom tooltips are only supported when using the applet (GRAPHEDIT OFF)
-* https://techsupport.informatio...om/sps/51322544.html
-*setUserToolTip("[SL] [GL]: [YV]");
-*setToolTipBackgroundColor(new Color(155,233,127));
-*//setToolTipColor(new Color(255,255,255));
-*//setToolTipBackgroundColor (new Color (122, 22, 22));
-*setToolTipOn();
This message has been edited. Last edited by: Francis Mariani,
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
It seems the reason for this is that the 90 measures used in the graph are very close to each other and the amounts are in the billions.
One of my colleagues suggested I determine the minimum and maximum values and use them to set the scale. This works. I first determine a rounded version of the min and max, then use them in the graph style.
-* Set up Minimum and Maximum Y-axis scale for graph
TABLE FILE HALLAMT1
SUM
COMPUTE SCALE_MIN_TEMP/P14 = MIN.CLOSING_BALPC / 10000000; NOPRINT
COMPUTE SCALE_MAX_TEMP/P14 = MAX.CLOSING_BALPC / 10000000; NOPRINT
COMPUTE SCALE_MIN/P14 = (SCALE_MIN_TEMP * 10000000) - 10000000;
COMPUTE SCALE_MAX/P14 = (SCALE_MAX_TEMP * 10000000) + 10000000;
ON TABLE HOLD AS HMINMAX
END
-RUN
-READFILE HMINMAX
...
setY1ScaleMinAuto(false);
setY1ScaleMin(&SCALE_MIN);
setY1ScaleMaxAuto(false);
setY1ScaleMax(&SCALE_MAX);
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
i do it the same way you do. what happens if you plot data/10**9 so you have values like 52 ? I'm not suggesting you DO that, just what happens to the autoscale IF you do...
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003