for drawing a graph using google visualization, if I send data hardcoded in JS file like this, if works perfectly fine.

```
data.addRows([[100, 30],[200, 70],[246, 150],[512, 780]]);

```

which I understand is clearly is 2D JS array.
But, when I am trying to send it dynamically, it doesn't work. Please check the code for this.

```
dataFromText = "100,30,200,70,246,150,512,780";
dataFromText = dataFromText.split(',');
while(dataFromText[0]) {
        result.push(dataFromText.splice(0,2));
    }
alert(result[1]); // this line  prints 200,70
data.addRows([result]);

```

Can anyone please help?

Thanks in advance!