I have Created a Pie Chart and Bundled the below select event

google.visualization.events.addListener(genderChart, 'select', function(){
           var selectedItem = genderChart.getSelection()[0];
            var topping;
                if (selectedItem) {
                    topping = GenderData.getValue(selectedItem.row, 0);

                    drawFinalChart('flag',topping.toString());
                 
                }
            
           });

I am calling another function to create another chart using below 
function drawFinalChart(type,flagvalue)
{
               var chartdata = new google.visualization.arrayToDataTable([
            ['Year','Count',{ role: 'style' },{ role: 'annotation' }]
            ['2009', 30, 'stroke-color: #871B47;','30'],
            ['2010', 40, 'stroke-color: #871B47;','40'],
            ['2011', 23, 'stroke-color: #871B47;','23'],
            ['2012', 55, 'stroke-color: #871B47;','55'],
            ['2013', 43, 'stroke-color: #871B47;','43'],
            ['2014', 56, 'stroke-color: #871B47;','56']
        ]);
}

The red line throws error - Uncaught TypeError: Array.prototype.map called 
on null or undefined


Can somebody give me a hand on this .

Thanks in Advance.

Regards,
Devanand.


-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.

Reply via email to