[CLOSED]Setting a proper interval when using error bars
Hi
There is a requirement to use Error Bars to set the range of the first standard deviation on a graph the displays the Mean. I am very close but the interval is set by taking the Upper Standard Deviation and dividing by 9(intervals) to get the inverval setting. A condition can occur where the interval value .4 can display properly (.4, .8, 1.2, 1.6, 2, 2.4, 2.8, 3) except for the last value of 3.0 it really should be 3.2 to be consistant. I will post the code but its a little messy(sorry):
ON TABLE HOLD AS LIMITS1 END -RUN -READ LIMITS1 &BLL.20.&BLU.20.&DCL.20.&DCU.20.&CHL.20.&CHU.20.&BTIP.52.&DTIP.52.&CTIP.52.&AGETIP.52.&AGEL.20.&AGEU.20.
-SET &maxy = IF (&BLU GT &DCU AND &BLU GT &CHU ) THEN &BLU ELSE IF (&DCU GT &BLU AND &DCU GT &CHU ) THEN &DCU ELSE &CHU ; -SET &interval = &maxy/9;
GRAPH FILE METRICSCORES -* Created by Info Assist for Graph SUM BLNMEAN AS 'Baseline Mean' DCNMEAN AS 'Discharge Mean' CDBMEAN AS 'Change Mean' BY METRICSCORES.SEG01.METRICNAME WHERE METRICNAME EQ 'Gait Speed'; ON GRAPH PCHOLD FORMAT JSCHART ON GRAPH SET VZERO OFF ON GRAPH SET HTMLENCODE ON ON GRAPH SET GRAPHDEFAULT OFF ON GRAPH SET GRWIDTH 1 ON GRAPH SET HAXIS &WF_STYLE_HEIGHT ON GRAPH SET VAXIS &WF_STYLE_WIDTH ON GRAPH SET GRMERGE ADVANCED ON GRAPH SET GRMULTIGRAPH 1 ON GRAPH SET GRLEGEND 0 ON GRAPH SET GRXAXIS 0 ON GRAPH SET LOOKGRAPH VBAR ON GRAPH SET AUTOFIT ON ON GRAPH SET STYLE * *GRAPH_SCRIPT setPieDepth(0); setPieTilt(0); setDepthRadius(0); setCurveFitEquationDisplay(false); setPlace(true); *END INCLUDE=endeflt.sty,$ TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $ *GRAPH_SCRIPT setReportParsingErrors(false); setSelectionEnableMove(false); setDisplay(getDataText(2), true); setDisplay(getDataText(1), true); setDisplay(getDataText(0), true); setScaleMax(getY1Axis(),&maxy); setTextString(getY1Title(),"Feet Together"); setDataTextPosition(5); *END *GRAPH_JS mouseOverIndicator: {enabled: true,color: ' '}, introAnimation: {enabled: true, duration: 1000 }, border: {width: 1, color: 'navy'},
WebFOCUS 8x - BI Portal, Developer Studio, App Studio, Excel, PDF, Active Formats and HTML5
August 29, 2016, 10:01 AM
Barry Solomon
Hi All
I actually found a solution for the issue. Below is the code I used. In the chart common I built a fex and saved the results In a table then did a -READ to get the data points for the graph.
-SET &whereclause = 'WHERE METRICNAME EQ ''Six-Minute Walk Test Distance'' '; -INCLUDE chartcommon
-*-RUN DEFINE FILE METRICSCORES metricN/A100 = 'Six-Minute Walk Test'; END
GRAPH FILE METRICSCORES -* Created by Info Assist for Graph SUM BLNMEAN AS 'Baseline Mean' DCNMEAN AS 'Discharge Mean' CDBMEAN AS 'Change Mean' -*AGEMEAN AS 'Age Mean' -*,[ &AGEL ,&AGEU ] BY metricN
WHERE METRICNAME EQ 'Six-Minute Walk Test Distance'; ON GRAPH PCHOLD FORMAT JSCHART ON GRAPH SET VZERO OFF ON GRAPH SET HTMLENCODE ON ON GRAPH SET GRAPHDEFAULT OFF ON GRAPH SET GRWIDTH 1 ON GRAPH SET HAXIS &WF_STYLE_HEIGHT ON GRAPH SET VAXIS &WF_STYLE_WIDTH ON GRAPH SET GRMERGE ADVANCED ON GRAPH SET GRMULTIGRAPH 1 ON GRAPH SET GRLEGEND 0 ON GRAPH SET GRXAXIS 0 ON GRAPH SET LOOKGRAPH VBAR ON GRAPH SET AUTOFIT ON ON GRAPH SET EMBEDHEADING ON ON GRAPH SET STYLE * *GRAPH_SCRIPT setPieDepth(0); setPieTilt(0); setDepthRadius(0); setCurveFitEquationDisplay(false); setPlace(true); *END INCLUDE=endeflt.sty,$ TYPE=FOOTING, JUSTIFY = LEFT,$ TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $ *GRAPH_SCRIPT setReportParsingErrors(false); setSelectionEnableMove(false); setDisplay(getDataText(3), true); setDisplay(getDataText(2), true); setDisplay(getDataText(1), true); setDisplay(getDataText(0), true); setScaleMax(getY1Axis(),&maxy); setScaleMin(getY1Axis(),&miny); setTextString(getY1Title(),"Feet"); setDataTextPosition(5); *END *GRAPH_JS mouseOverIndicator: {enabled: true,color: ' '}, introAnimation: {enabled: true, duration: 1000 }, border: {width: 1, color: 'navy'},