Add this code add images or phone numbers.
data.addRows([
[{ v: response[i].Employee, f: response[i].Employee +'<img
src="images/phone.png" />'+response[i].PhoneNo + '<div class="plus"><img
src="images/plus.png" style="height: 27px; width: 33px" /></div>' },
{ v: response[i].Manager, f: response[i].Manager + '<div class="plus"><img
src="images/plus.png" style="height: 27px; width: 33px" /></div>' },
response[i].PhoneNo]
]);
On Thursday, May 14, 2015 at 8:58:46 AM UTC-4, XYZ wrote:
> var hdValue = document.getElementById("<%=hdData.ClientID%>").value;
> var response = $.parseJSON(hdValue);
> var data = new google.visualization.DataTable();
> data.addColumn('string', 'Employee');
> data.addColumn('string', 'Manager');
> data.addColumn('string', 'PhoneNo');
>
>
> for (var i = 0; i < response.length; i++) {
> var row = new Array();
> row[0] = response[i].Employee + '<div class="plus"><img
> src="images/plus.png" style="height: 27px; width: 33px" /></div>';
> row[1] = response[i].Manager + '<div class="plus"><img
> src="images/plus.png" style="height: 27px; width: 33px" /></div>';
> row[2] = response[i].PhoneNo;
>
> data.addRow(row);
> }
>
> I want to add the phone details in box not on tooltip.
>
> I am finding difficult to add the phone or any other details because below
> code
>
> row[0] = response[i].Employee + '<div class="plus"><img
> src="images/plus.png" style="height: 27px; width: 33px" /></div>';
> row[1] = response[i].Manager + '<div class="plus"><img
> src="images/plus.png" style="height: 27px; width: 33px"
>
> both the row 0 and row 1 expects same value example if i remove the image
> from employee then the design wont come properly.
>
> Here i found the code where i can the details
> data.addColumn('string', 'Name');
> data.addColumn('string', 'Manager');
> data.addColumn('string', 'ToolTip');
> data.addRows([
> [{v: 'Mike', f: 'Mike<div style="color:#196589;
> font-style:italic">President</div><div class="plus"><img src="
> http://1.bp.blogspot.com/-IsfgLDHMUG8/UFxkw3uSMdI/AAAAAAAAApE/3TLxFtPQTBE/s1600/pus.png"></div>'},
>
> '',* 'The President'*],*Its additional text(i can add phone number like
> this)*
> [{v: 'Jim', f: 'Jim<div style="color:#196589;
> font-style:italic">*Vice
> President*</div><div class="plus"><img src="
> http://1.bp.blogspot.com/-IsfgLDHMUG8/UFxkw3uSMdI/AAAAAAAAApE/3TLxFtPQTBE/s1600/plus.png"></div>'},
>
> 'Mike', 'VP'],
> ['Alice', 'Mike', ''],
> [{v: 'Bob', f: 'Bob<div class="plus"><img src="
> http://1.bp.blogspot.com/-IsfgLDHMUG8/UFxkw3uSMdI/AAAAAAAAApE/3TLxFtPQTBE/s1600/plus.png"></div>'},
>
> 'Jim', 'Bob Sponge Test'],
> ['Carol', 'Bob', '']
> ]);
>
> But since i am fetching data from database don t know how to add
> dynamically.
>
> Also is it google chart takes only three columns .Please suggest
> ------------------------------
>
>
--
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.