You are quoting the entire object. Your code should look more like this:
$(xData.responseXML).SPFilterNode('z:row').each(function() {
//OrgName=$(this).attr("ows_OrgName");
var name = {
v: $(this).attr("ows_Name"),
f: "<font color='red'>test</font>"
};
//alert("name: "+name);
ReportTo = $(this).attr("ows_Title");
//ReportTo = $(this).attr("ows_ReportToOrg");
ToolTip = $(this).attr("ows_ToolTip");
data.addRow([name, ReportTo, ToolTip]);
});
- Sergey
On Fri, Jan 24, 2014 at 8:06 AM, TheInnovator <[email protected]> wrote:
> I am trying to implement a Google Org chart and add the position as you
> see here
> https://developers.google.com/chart/interactive/docs/gallery/orgch
> art#Data_Format
> (Mike 'President' and Jim 'Vice President')
>
> When I try the same I get the following
> http://isaac.issharepoint.com/examples/WebPartPages/BuildOrgChart.aspx
>
> Here's a snippet of my code:
> I am using it in a SharePoint page
>
> $(xData.responseXML).SPFilterNode('z:row').each(function() {
>
>
> //OrgName=$(this).attr("ows_OrgName");
> name =
> "{v:"+$(this).attr("ows_Name")+", f:<font color='red'>test</font>},'',''";
>
> //alert("name: "+name);
> ReportTo = $(this).attr("ows_Title");
> //ReportTo =
> $(this).attr("ows_ReportToOrg");
>
> ToolTip = $(this).attr("ows_ToolTip");
>
> data.addRow([name, ReportTo, ToolTip]);
> });
> }
>
>
> Thanks for any help you can provide
>
> --
> 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/groups/opt_out.
>
--
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/groups/opt_out.