AnsweredAssumed Answered

Legend built from renderer fails with number in label

Question asked by kenbuja Champion on Sep 28, 2017
Latest reply on Sep 28, 2017 by rscheitlin

Is it a bug or by design that a legend can't be made from a renderer build using a numeric value in the label property?

 

uniqueValueRenderer.addValue({ value: "M217_07", symbol: createSymbol("#fd7f6f"), label: "7" }); //works

uniqueValueRenderer.addValue({ value: "M217_07", symbol: createSymbol("#fd7f6f"), label: 7 }); //crashes

 

If I use the first line (using "7") in this sample, the legend builds. If I use the second line (using 7), the error "TypeError: b.replace is not a function" is thrown.

 

Using a number does work in the 4.x sample.

Outcomes