Jump to content

Can someone please tell why the border properties are not working in this code? TYPE=Data, COLUMN=N5, BORDER=HEAVY, BORDER-COLOR=RGB(255 0 0), BORDER-STYLE=SOLID, COLOR=RGB(167 247 163), WHEN= VAR_PCT GE 40, $


Merin Joseph

Recommended Posts

image.thumb.png.cfde8204ebbb0a3abc04c62ba6248832.png Im trying to add a solid border to the area chart shown in below and it should change with the when condition. Except the border properties other properties are working. Means 211,212 & 213 are working . im trying to add a border along with the properties like 210.

image.png.c1c20a4804e42babce1ee7e8374b5a91.png

Link to comment
Share on other sites

Try changing the orders of your conditions

Change row 210 with row 213

Meaning that :

1- first condition to eveluate will be the line with VAR_PCT LT 38

2- second condition to eveluate will be the line with VAR_PCT GE 38

3- third condition to eveluate will be the line with VAR_PCT GE 40

You must take in consideration that ALL the styling is performed and only the last TRUE condition remain applied

Link to comment
Share on other sites

GRAPH FILE SWISHER_CORE/SVP_HOLD_FILE_DASHSUMCOMPUTE AVG_FSCT/D20 = &CALCFCSTUNITS / &CNT ; NOPRINTCOMPUTE RUN_TOT_FCST/D20 = LAST RUN_TOT_FCST + CALCFCSTUNITS; AS '&FCST_LEGAND.EVAL'COMPUTE RUN_TOT_EACHES/D20 = LAST RUN_TOT_EACHES + QTY_SHIPPED_EACHES; AS '&EACHES_LEGAND.EVAL'COMPUTE VAR_PERIOD/D20 = LAST VAR_PERIOD + AVG_FSCT; AS '&VARIANCE_LEGAND.EVAL'COMPUTE VAR_PCT/P3.2% = (&EACHES_VALUE / &FCST_VALUE) * 100 ; -IF &PERIOD EQ 'MTD' THEN GOTO MONCODE ELSE IF &PERIOD EQ 'QTD' THEN GOTO QTRCODE ELSE GOTO YEARCODE; -MONCODE-*VARIANCE_MTD NOPRINTBY TRANDATE_DAY NOPRINTBY TRANDATE_DAY AS 'Period &MNTH_TXT'WHERE TRANDATE_MONTH EQ &MONTH-GOTO ENDDATECODE -QTRCODE-*VARIANCE_QTD NOPRINTBY TRANDATE_MONTH NOPRINTBY MONTH_ALPHA AS 'Period &QTR'WHERE TRANDATE_YEAR_D GE &QTR_CY.EVAL AND TRANDATE_YEAR_D LE &CYMONTH.EVAL;-GOTO ENDDATECODE -YEARCODE-*VARIANCE_YTD NOPRINTBY TRANDATE_MONTH NOPRINTBY MONTH_ALPHA AS 'Period &YEAR'WHERE TRANDATE_YEAR_D GE &CYJAN.EVAL AND TRANDATE_YEAR_D LE &CYMONTH.EVAL;-GOTO ENDDATECODE-ENDDATECODEWHERE ZONE1 EQ &ZONE.(OR(FIND ZONE IN SWISHER_CORE/SVP_HOLD_FILE_DASH |FORMAT=A2,SORT=ASCENDING)).Zone:.;WHERE REGION EQ &REGION.(OR(FIND REGION IN SWISHER_CORE/SVP_HOLD_FILE_DASH |FORMAT=A2,SORT=ASCENDING)).Region:.;WHERE DIVISION EQ 'Drew Estate';ON GRAPH PCHOLD FORMAT JSCHARTON GRAPH SET VZERO OFFON GRAPH SET GRWIDTH 1ON GRAPH SET UNITS &WF_STYLE_UNITSON GRAPH SET HAXIS &WF_STYLE_WIDTHON GRAPH SET VAXIS &WF_STYLE_HEIGHTON GRAPH SET LOOKGRAPH LINEON GRAPH SET AUTOFIT ONON GRAPH SET STYLE **GRAPH_SCRIPT setPieDepth(0);setPieTilt(0);setDepthRadius(0);setPlace(true);setUseSeriesShapes(true);setCurveFitEquationDisplay(false); *ENDINCLUDE=IBFS:/WFC/Global/Themes/Standard/Default/theme.sty,$ TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $TYPE=DATA, COLUMN=N1, BUCKET=x-axis, $TYPE=DATA, COLUMN=N2, BUCKET=x-axis, $TYPE=DATA, COLUMN=N3, BUCKET=y-axis, $TYPE=DATA, COLUMN=N4, BUCKET=y-axis, $TYPE=DATA, COLUMN=N5, BUCKET=y-axis, $-* FOR LEGEND VARTYPE=DATA, COLUMN=N6, BUCKET=y-axis, $TYPE=Data, COLUMN=N5, BORDER-COLOR=RGB(255 0 0), BORDER-STYLE=SOLID,COLOR=RGB(242 97 92), WHEN= VAR_PCT LT 38, $TYPE=Data, COLUMN=N5, BORDER-COLOR=RGB(255 255 0), BORDER-STYLE=SOLID, COLOR=RGB(246 247 139), WHEN= VAR_PCT GE 38, $TYPE=Data, COLUMN=N5, BORDER-COLOR=RGB(0 255 0), BORDER-STYLE=SOLID, COLOR=RGB(167 247 163), WHEN= VAR_PCT GE 40, $-*TYPE=Data, COLUMN=N5, COLOR=RGB(167 247 163), WHEN= VAR_PCT GE 40, $-*TYPE=Data, COLUMN=N5, COLOR=RGB(246 247 139), WHEN= VAR_PCT GE 38, $-*TYPE=Data, COLUMN=N5, COLOR=RGB(242 97 92), WHEN= VAR_PCT LT 38, $*GRAPH_SCRIPTsetLegendPosition(2);setTextFormatPreset((getLegendText(),0);setLegendAutomatic(true);setLegendScroll(1);setLegendSeriesCount(3);setLegendSeriesStart(0);setLegendOrient(0); setReportParsingErrors(false);setSelectionEnableMove(false);*GRAPH_JS_FINAL"series": [ { series:1 , riserShape: 'area', border: {width: 2},marker: {shape: 'circle', size: 7, visible: true},  } , { "color": "rgba(22, 47, 214, 1)", series: 0, marker: {shape: 'circle', size: 5, visible: true} }, { "color":"rgba(255, 255, 255, 0)", "riserShape": "line", series: 2, "tooltip": null, } ],"blaProperties": { "seriesLayout": "absolute",},"agnosticSettings": { "chartTypeFullName": "Line_Absolute"}*ENDENDSTYLE

Here is the graph script part. Thank you

Link to comment
Share on other sites

Yea i have the below code for a single border color . But not sure how can i apply condition on it.

"series":   [

   {

series:1 , riserShape: 'area', border: {width: 2,color: 'red'},marker: {shape: 'square', size: 7, visible: true},

  } ,

Link to comment
Share on other sites

It looks like the value of your COMPUTE VAR_PCT is based entirely on amper variables, it will only have a single value for any run of the chart. Therefore I think you can set the color using Dialogue Manager:

-SET &COLOR = IF (&EACHES / &FCST * 100) GT 40 THEN 'rgba(167, 247, 163, 1)' ELSE- IF (&EACHES / &FCST * 100) GT 30 THEN 'rgba(246, 247, 139, 1)' ELSE- 'rgba(242, 097, 092, 1)' ;

Then in chart code:

series: 2, "color": "&COLOR",
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...