DataColumn in google.visualization.DataTable

28 views
Skip to first unread message

Neha Prasad

unread,
Apr 18, 2017, 5:09:51 AM4/18/17
to Google Visualization API
Hello,

    I am using Google Calendar Chart in which I wanna to display Google Calendar Chart Tooltip as Date : Bank_Name - Amt .
For which I data three column :
      var data = new google.visualization.DataTable();
                data.addColumn({ type: 'date', id: 'Date' });
                data.addColumn({ type: 'string', id: 'BankName' });
                data.addColumn({ type: 'number', id: 'BaseAmount' });


And add to DataTable data as
                     str = new Array(new Date(dateFormat),String(dataValues[i].BankName), Number(dataValues[i].BaseAmount));          //
                    alert(str);
                    data.addRows([str]);
        

But it not taking it while displaying the google Calendar chart. Displaying error "Invalid Data Table format: must have two data columns."


Kindly help me how to display date: Bank_Name  along with baseAmount.

Reply all
Reply to author
Forward
0 new messages