Export Google Chart to Excel Sheet in Angular
<p>Im using ng-google-chart to create charts from data I receive from a database. I store the data in a table. I need to export both the table and the chart.</p>

<p>I'm using the following technique to export tables (where "exportable" is the div the contains the table):</p>

<pre><code> $scope.export = function () 
{

 var blob = new Blob([document.getElementById('exportable').innerHTML], {
                type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8"
            });
            saveAs(blob, "Record.xls");


            alert("export done"); 
        };
</code></pre>

<p>I cannot find any way to add the chart to this file.</p>

<p>This is the code to generate a chart</p>

<pre><code>var chart1 = {};
                    chart1.type = "ColumnChart";
                    chart1.cssStyle = "height:400px; width:500px;";
                    chart1.data = {
                        "cols": [
                            { id: "gender", label: "Gender", type: "string" },
                            { id: "number", label: "number", type: "number" }

                        ], "rows": [
                            {
                                c: [
                                   { v: "male" },
                                   { v: $scope.male, f: $scope.male }

                                ]
                            },

                            {
                                c: [
                                   { v: "female" },
                                   { v: $scope.female }

                                ]
                            }
                        ]
                    };

                    chart1.options = {
                        "title": "",
                        "isStacked": "true",
                        "fill": 20,
                        "displayExactValues": true,
                        "vAxis": {
                            "title": "Number", "gridlines": { "count": 6 }
                        },
                        "hAxis": {
                            "title": "gender"
                        }
                    };

                    chart1.formatters = {};

                    $scope.chart = chart1;


                }
</code></pre>