alpsilva

Members
  • Content count

    2
  • Joined

  • Last visited

Posts posted by alpsilva


  1. i'm trying to process data from a query. So I create a JSON object and populate it using a loop, like so:

     

    var processedData = [{
    	label: "teste",
    	value: 123
    }, {
    	label: "teste2",
    	value: 321
    }];
    
    if (dataParse.response) {
    	dataParse = dataParse.response;
    	for (var aux of dataParse) {
    		jsonAux = {
    			label: aux.departamento,
    			value: parseInt(aux.quantidade)
    		}
    		processedData.push(jsonAux);
    	}
    }


    after the loop, the object is returned and used as chart data. As seen in the image attached, it is done without problems (For testing purposes, i initialized the object "processedData" with two test elements: "teste1" and "teste2"). But FusionChart can only load the initiliazed elements.

    I don't have any idea why this is happening and already tried many different ways to do this.

    Would be really glad if someone could be of use. Thanks in advance.

    help.png