Select to view content in your preferred language

help me with  render UniqueValueRenderer

479
1
07-04-2013 11:52 AM
ChristianVazquez
New Contributor
I have a code to generate dynamic render but does not work, and probe many things and do not see anything.


this work

renderer.addValue(1,simbolo1);
                renderer.addValue(2,simbolo1);
                renderer.addValue(3,simbolo0);



this no work


           
var array = new Array();

            array[1] = 'simbolo1';
            array[2] = 'simbolo2';
            array[3] = 'simbolo0';
      



            for (var indice in array) {


               renderer.addValue(parseFloat(indice), array[indice]);




            }





Can anyone help



Thanks
0 Kudos
1 Reply
SteveCole
Honored Contributor
In your second code block, simbolo1, simbolo2, and simbolo0 are actually text strings and not symbol objects. Try this instead:

var array = new Array();

            array[1] = simbolo1;
            array[2] = simbolo2;
            array[3] = simbolo0;
      



            for (var indice in array) {


               renderer.addValue(parseFloat(indice), array[indice]);




            }
0 Kudos