Make building Chart Dashlets a bit easier

sugarcrmdevelopers —  August 9, 2011 — 3 Comments

I was working to help someone on the forums last week with debugging some issues with getting a chart dashlet up and running. As I was going thru this exercise, I realized one big thing… this is way too hard to do. Lots of code duplication is needed to get it running, and thus you are stuck with copying an existing chart dashlet and making the changes for your particular dashlet. Makes it rather hard for the average developer to get up and running, and forces you to do more reverse engineering than being able to concentrate on your data you are trying to display. So I decided to fix this :-).

I created a GitHub project over the weekend that provides an abstract class that does all the heavy weight work for each kind of chart provided out of the box, and leaving you to fill in the blanks with the needed chart properties and the dataset itself. Each dataset method in the classes has great PHPDoc comments on what the data structure should like that is being pushed into the chart. This should help any Sugar developer who has struggled building chart dashlets, enabling them to build them with ease.

Feel free to check out the source code, and definitely provide any feedback, fixes, or changes needed back via a pull request. And let me know if this helps making chart dashlets easier, and if it’s something you’d like to see incorporated in the product down the road.

3 responses to Make building Chart Dashlets a bit easier

  1. 

    Thanks for this,
    However could you give us an example to understand how to use it?
    thanks again

  2. 

    Could you give an example of how to load the array in the method getdataset??Thanks.

  3. 

    Check out the classes themselves for ideas on how the arrays should work, and the README file on how to create a new chart dashlet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s