I'm using the following code to match the colors in multiple graphs as they are drilled. It's working fine everywhere except in my pie charts where the colors in the legend are the correct colors but no longer match the chart. (ONLY happens in PNG)
Hi, Can you please post your full code using CAR file? What version of WF are you on?
Here is my example using CAR that worked for me in 8009:
GRAPH FILE CAR
SUM DEALER_COST
BY COUNTRY
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET VZERO OFF
ON GRAPH SET LOOKGRAPH PIEMULTI
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
setPieFeelerTextDisplay(1);
*END
DEFMACRO=COND0001, MACTYPE=RULE, WHEN=COUNTRY EQ 'ENGLAND', $
DEFMACRO=COND0002, MACTYPE=RULE, WHEN=COUNTRY EQ 'FRANCE', $
DEFMACRO=COND0003, MACTYPE=RULE, WHEN=COUNTRY EQ 'ITALY', $
DEFMACRO=COND0004, MACTYPE=RULE, WHEN=COUNTRY EQ 'JAPAN', $
DEFMACRO=COND0005, MACTYPE=RULE, WHEN=COUNTRY EQ 'W GERMANY', $
TYPE=DATA,COLOR=RGB(166 123 60),MACRO=COND0001,$
TYPE=DATA,COLOR=RGB(166 165 60),MACRO=COND0002,$
TYPE=DATA,COLOR=RGB(57 146 53),MACRO=COND0003,$
TYPE=DATA,COLOR=RGB(165 60 62),MACRO=COND0004,$
TYPE=DATA,COLOR=RGB(53 93 145),MACRO=COND0005,$
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
*END
ENDSTYLE
END
-RUN
November 26, 2014, 03:49 PM
J.L. Hinds
Nick That does work which inspired me to dig deeper. I changed my style sheet and it works fine now. Problem is the style sheet I need to use has all the defined colors for our customer. Any idea what could be causing the legend to pull different colors? Appreciate the advice, I was stumped. Jeff
WebFOCUS 7.6 Windows, All Outputs
December 01, 2014, 10:13 AM
<nick z>
Hi Jeff, I am not sure why the stylesheet would cause this issue. I would suggest to open a case with CSS.