AnsweredAssumed Answered

setVisualVariables method for opacity renderer

Question asked by ialixandroaeesriro-ro-esridist Employee on Apr 3, 2018

Hi guys,

I have a situation with an app made with JS API 3.16 that was updated to version 3.23(the latest):

Long story short: a layer is using ClassBreakRenderer and the method setOpacityInfo ( is used to add opacity to that renderer. In the 3.23 version, the method is deprecated and setVisualVariables method is recomended to be used instead (;


this method accepts an array of objects; we are constructing the needed objecte with the opacityInfo type and opacity values (as needed and as in the example).


The problem is that opacity is not working and when we were checking the requests made, we saw that in the returned object from the generateRenderer request, the value for transparency in the color array was 255 (it should be between 0 and 1). (See pictures attached below)


Is this an intern problem of the API or I`m just doing something wrong?