in Libraries

Graphiz Problem!

I was working on the Drupal OrgChart module tonight, specifically the rendering of the chart image via GraphViz, and I got stuck for at least an hour on a trifle! I planned to use the PEAR library for GraphViz (Image_GraphViz) and I wrote a function using the class it provides. I run the procedure and get weird errors about not being able to find files and such. After debugging for awhile, I find out that there is a property binPath that is not present. I had expected this to point to my install of GraphViz, which I knew to be especially important because it was in a weird macports directory.

It turns out that I had not installed the version I needed! I didn’t realize the version I wanted was beta, and to download a beta package, you need to explicitly state so in the PEAR command.

sudo pear install Image_GraphViz-beta

<h1>instead of</h1>

sudo pear install Image_GraphViz

After downloading the most recent package, it turned out my code worked almost perfectly. What a waste of a night!

The past few days, I also worked on a few other modifications. I removed the requirement for a “subordinate_id” field. Also, I made the profile field names options in the administrative settings page.

The project page is here: //code.google.com/p/drupal-orgchart/.