suhas
suhas

Reputation: 601

VML issue for Organization Chart WebPart in SharePoint 2010

I have a SharePoint intranet site to which I have Site Collection Admin access(do not have Farm Admin access). This site is to promote collaboration among employees. I needed to implement Organization chart diagram that shows the organization/hierarchy of employees from Senior managers-> Managers -> Tech leads to developers.

I did not find a solution that does not require Farm admin access. I did find this Codeplex project (http://orgchartpart.codeplex.com/).

I also found this addin that allows to deploy a Sandboxed Visual web part through the VS 2010 SharePoint power tools add-in.

I decided to implement my own Sandboxed Visual Web part solution for this Org Diagram. I was able to implement it, with 2 problems:

  1. This javascript solution uses VML and hence does not work properly on IE 8. Please help with the changes required so that it will work fine in IE7, 8 and 9.

  2. In IE 8 no diagram was visible so I switched the Document mode to IE7 in which case The Org diagram is flowing beyond the SahrePoint Site Page if the diagram is big. I am not able to get a scroll bar in the Site page where this Visual web part is added. Please provide some help/pointers as to how to ensure to get the Site page grows automatically when Visual web part is big ? I am unable to figure out if this is IE issue or webpart issue. Any other alternatives for this javascript Org chart is also welcome.


I switched to Google's Visualization API (http://code.google.com/apis/chart/interactive/docs/gallery/orgchart.html) for the Organization charts since I had only a day to fix the VML issue. I tried to get the existing VML code to work for a couple of hours but then I realized it might require a lot of code changes.

As for no scroll bars issue, I just realized every single sharepoint page is behaving in this manner i.e. no scroll bars are appearing for SharPoint pages in IE7 mode. I also tested on a machine that has only IE7 installed, it was working in a similar manner. Do not know if there is some configuration required in SharePoint to make it work in IE 7 (I remember reading somewhere that SharePoint 2010 was designed keeping IE 8 in mind)...

Any inputs on why SharePoint pages look different in IE 7 ?

The meta tag in the master page is :

 <meta http-equiv="X-UA-Compatible" content="IE=8"/>

This Site Collection is using custom starter Master page.

Upvotes: 1

Views: 1270

Answers (1)

Frodo Baggins
Frodo Baggins

Reputation: 8543

IE 8 in standard mode broke VML that is altered using the standard setAttribute call in the DOM API. We posted a summary of the state of VML rendering in various browsers using different doctypes here.

The easiest suggestion I can offer is the same as your attempt in (2), tell IE 8 to work in IE 7 mode using this DOCTYPE - <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>.

We did get VML working in IE 8 standards mode with a rather nasty workaround, so it possible, but you would probably need to spend a number of weeks fixing the project, I'm guessing that isn't an option.

In terms of the scrollbars, does the CSS of the container of the diagram have:

overflow: auto;

Upvotes: 0

Related Questions