Merin Joseph Posted June 6, 2023 Share Posted June 6, 2023 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. Link to comment Share on other sites More sharing options...
Martin Yergeau Posted June 6, 2023 Share Posted June 6, 2023 Try changing the orders of your conditionsChange row 210 with row 213Meaning that :1- first condition to eveluate will be the line with VAR_PCT LT 382- second condition to eveluate will be the line with VAR_PCT GE 383- third condition to eveluate will be the line with VAR_PCT GE 40You 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 More sharing options...
Merin Joseph Posted June 6, 2023 Author Share Posted June 6, 2023 I tried it ,but no luck. still border properties are not working. below is what im trying to add Link to comment Share on other sites More sharing options...
Martin Yergeau Posted June 6, 2023 Share Posted June 6, 2023 Can you please share the whole Graph code section, not an image.Copy paste the code using the Code Snippet. Link to comment Share on other sites More sharing options...
Martin Yergeau Posted June 6, 2023 Share Posted June 6, 2023 Not sure that a border can be applied to data of an area graph Link to comment Share on other sites More sharing options...
Merin Joseph Posted June 6, 2023 Author Share Posted June 6, 2023 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 ®ION.(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"}*ENDENDSTYLEHere is the graph script part. Thank you Link to comment Share on other sites More sharing options...
Martin Yergeau Posted June 6, 2023 Share Posted June 6, 2023 Not only the styling part theGRAPH FILE ....SUM ...BY .......END Link to comment Share on other sites More sharing options...
Merin Joseph Posted June 6, 2023 Author Share Posted June 6, 2023 I updated the above one. Please have a look Link to comment Share on other sites More sharing options...
Martin Yergeau Posted June 6, 2023 Share Posted June 6, 2023 Try adding the following to each styling rows with border attribute BORDER=LIGHT, Link to comment Share on other sites More sharing options...
Merin Joseph Posted June 6, 2023 Author Share Posted June 6, 2023 Actually i had tried border =light / heavy. And it didn't work. Link to comment Share on other sites More sharing options...
Martin Yergeau Posted June 6, 2023 Share Posted June 6, 2023 Doesn't seems that you can use the BORDER property that way for a line/area graph.With the below, you can change the border color per series but cannot use the WHEN= condition.setBorderColor(getSeries(0),new Color(255,0,0)); Link to comment Share on other sites More sharing options...
Merin Joseph Posted June 6, 2023 Author Share Posted June 6, 2023 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 More sharing options...
David Beagan Posted June 6, 2023 Share Posted June 6, 2023 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 More sharing options...
Merin Joseph Posted June 7, 2023 Author Share Posted June 7, 2023 Actually the color is working the condition, I have issues only on the border color. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now