Thanks for the reply, Doug
When I add the WHEN= conditions to the stylesheet, it still doesn't override the color supplied by the colorScale property of the tree map. Referring to the 8.1 documentation at WebFOCUS Release 8.1 Version 05M > Charting > Creating HTML5 Charts With WebFOCUS Language > Special Topics > Defining a Color Scale (colorScale)
I want the boxes in the chart to be colored one color if one of the fields is greater than a certain amount, and I want them to be colored another if the value is less than that amount. If I don't use any field for the color bucket in the stylesheet, such as: TYPE=DATA, COLUMN=N2, BUCKET=color, $ the chart won't color at all, regardless of what color values I assign each series in the stylesheet. If I do, it takes a color gradient based on that field rather than separating it into 2 distinct colors.
This is the code for the stylesheet of my tree map:
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
setDataTextDisplay(true);
*END
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, ARGRAPHENGINE=JSCHART, $
TYPE=DATA, COLUMN=N1, BUCKET=detail, $
TYPE=DATA, COLUMN=N3, BUCKET=size, $
TYPE=DATA, COLUMN=N3, WHEN=N3 GT 0, COLOR=RGB(255 0 0), HYPERLINK-COLOR=RGB(255 0 0), $
TYPE=DATA, COLUMN=N3, WHEN=N3 GT 0, COLOR=RGB(0 255 64), HYPERLINK-COLOR=RGB(0 255 64), $
TYPE=DATA, COLUMN=N2, WHEN=N3 GT 0, COLOR=RGB(255 0 0), HYPERLINK-COLOR=RGB(255 0 0), $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
setDataTextPosition(1);
setDisplay(getDataText(),true);
setDataTextDisplay(true);
setFillType(getSeries(*),1);
setTransparentFillColor(getSeries(*), true);
setTransparentBorderColor(getSeries(*), true);
setFillType(getSeries(0),1);
setFillType(getLegendArea(),1);
setTransparentFillColor(getSeries(0), true);
setTransparentFillColor(getLegendArea(),true);
setDisplay(getLegendArea(),true);
setBorderColor(getLegendArea(),new Color(0,0,0));
setTransparentBorderColor(getSeries(0), true);
*GRAPH_JS_FINAL
"legend": {
"visible": true
},
"pieProperties": {
"holeSize": "0%"
},
"agnosticSettings": {
"chartTypeFullName": "Treemap"
}
*END
ENDSTYLE
Webfocus 8104 and 7703, Windows 8, Output formats: HTML, Excel, PDF, Active Report