Focal Point
[CLOSED] Negative color for YAXIS Labels in Line Graph

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6917013196

May 16, 2019, 06:21 AM
Durai
[CLOSED] Negative color for YAXIS Labels in Line Graph
I need to apply negative color (RED for Negative values) for YAXIS Labels in line Graph (Without Using Bucket Chart as PDF Compound Report does not support Bucket Charts).Is there any way to achieve it?

Sample Code:

DEFINE FILE GGSALES
MON/M=DATE;
MONTH/A15= IF MON EQ '01' THEN 'January' ELSE IF MON EQ '02' THEN 'February'
ELSE IF MON EQ '03' THEN 'March' ELSE IF MON EQ '04' THEN 'April'
ELSE IF MON EQ '05' THEN 'May' ELSE IF MON EQ '06' THEN 'June'
ELSE IF MON EQ '07' THEN 'July' ELSE IF MON EQ '08' THEN 'August'
ELSE IF MON EQ '09' THEN 'September' ELSE IF MON EQ '10' THEN 'October'
ELSE IF MON EQ '11' THEN 'November' ELSE 'December';
END

-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='405.0';
-DEFAULTH &WF_STYLE_WIDTH='770.0';
-DEFAULTH &WF_TITLE='WebFOCUS Report';
GRAPH FILE GGSALES
SUM
BUDDOLLARS/D7B NOPRINT
DOLLARS/D7B NOPRINT
COMPUTE DIFFERENCE_DOLLARS/D7B =(DOLLARS-BUDDOLLARS)/1000; AS ''
COMPUTE DIFFERENCE_DOLLARS/D7B =(BUDDOLLARS-DOLLARS)/1000; AS ''
BY REGION
ACROSS MONTH COLUMNS 'Jan' AND 'Feb' AND 'Mar' AND 'Apr' AND 'May' AND 'Jun' AND 'Jul' AND 'Aug' AND 'Sep' AND 'Oct' AND 'Nov' AND 'Dec'
ON GRAPH SET LOOKGRAPH VLINE
ON GRAPH SET GRID ON
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 1
ON GRAPH SET GRXAXIS 1
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET STYLE *
*GRAPH_JS
blaProperties: {
seriesLayout: 'stacked',
dash: '0',
},

xaxis: {
title:
{
visible: false,
color:'white',
font: ' 8pt TAHOMA',
},
labels: {
visible: true,
font: ' 8pt TAHOMA',
color: 'black',
rotation: 0
},
majorGrid: {
visible:true,
aboveRisers: true,
lineStyle: {
width: 0,
color: 'black'
},
ticks: {visible:false,style: 'white'}
},},
yaxis:
{
title:
{
visible:false,
color:'white',
font: ' 8pt TAHOMA',
},
baseLineStyle: {width: 0, color: 'green', dash: '0 0'},
bodyLineStyle: {width: 0, color: 'blue'},
labels:
{
visible: true,
font: ' 8pt TAHOMA',
color:'black',
rotation: 0
},
majorGrid: {
visible:true,
aboveRisers: true,
lineStyle: {
width: 0.2,
color: 'black'
},
ticks: {visible:false,style: 'white'}
},},

series: [{series:0, color: 'white'}]
*END
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
*END
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
setDisplay(getDataText(0), true);
setStackedDataValueSum(false);
setFontName(getDataText(),"ARIAL");
setFontSizeAbsolute(getDataText(),true);
setAutofit(getDataText(),false);
setFontSizeInPoints(getDataText(),7);
setPlaceResize(getDataText(),0);
setFontName(getO1Label(),"ARIAL");
setFontName(getLegendText(),"ARIAL");
setFontSizeAbsolute(getLegendText(),true);
setAutofit(getLegendText(),false);
setPlaceResize(getLegendText(),0);
setFontSizeInPoints(getLegendText(),8);
setDisplay(getY1Title(),false);
setDisplay(getY1Label(),true);
setDisplay(getO1Title(),false);
setFontSizeAbsolute(getO1Label(), true);
setFontSizeInPoints(getO1Label(), 8);
setPlaceResize(getO1Label(), 0);
setFontStyle(getO1Label(),0);
setDisplay(getO1MajorGrid(),false);
setFillColor(getFrame(),new Color(255,255,255));
setFillColor(getSeries(0),new Color(94,131,205));
setFillColor(getSeries(1),new Color(206,105,37));
setFillColor(getSeries(2),new Color(146,146,146));
setFillColor(getSeries(3),new Color(223,171,0));
setFillColor(getSeries(4),new Color(59,95,173));
setFillColor(getSeries(5),new Color(97,154,59));
setFillColor(getSeries(6),new Color(160,184,212));
setFillColor(getSeries(7),new Color(255,255,255));
setTextFormatPattern(getDataText(),"#.#");
setDepthRadius(1);
setDepthAngle(90);
setAxisSide(getO1Axis(),1);
setBorderColor(getFrameSide(),new Color(224,224,224));
setFillColor(getFrame(),new Color(255,255,255));
setBorderColor(getChartBackground(),new Color(224,224,224));
setFillColor(getY1AltFmtLabel(0),new Color(224,224,224));
setFillColor(getY1AltFmtFrame(1),new Color());
setReferenceLineValueY1(0,0.0);
setFillColor(getReferenceLine(getY1Axis(),0), new Color(224,224,224));
setLineWidth(getReferenceLineY1(0),1);
setDataTextDisplay (true);
setTextFormatPreset(getSeries(0),-1);
setTextFormatPattern(getSeries(0),"$#0.00;($#0.00)");
setTextFormatPreset (getY1Label(), -1);
setTextFormatPattern (getY1Label(),"$#0.00;($#0.00)");
*END
ENDSTYLE
END
-RUN

This message has been edited. Last edited by: FP Mod Chuck,


Webfocus AppStudio 8201
Windows
May 21, 2019, 10:45 AM
FP Mod Chuck
Durai

Since no one has been able to provide any guidance I suggest you open a case with techsupport.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats