Results 1 to 9 of 9

Thread: How to create new charts using DashletGenericChart() - 5.5.x

  1. #1
    Join Date
    Jan 2011
    Posts
    19

    Question How to create new charts using DashletGenericChart() - 5.5.x

    I'm trying to make a range of custom charts (as dashlets) so users can add them to their dashboard as they like.

    All I've been able to find so far is :

    http://developers.sugarcrm.com/docs/...r.html#9000997

    And there appears to be nothing in the wiki. I've gone though class SugarChart() and am currently reverse engineering an API doc so I can get a clue of what is going on.

    I've copied an exsisting Chart Dashlet from ........

    {$home}/modules/Charts/Dashlets

    ......and am trying to work though how it creates the query, XML, then eventaully displays it.

    Though with no documentation it's very slow going.

    Does anyone know off or have the API documentation (if it exsists) a tutorial or even what format the query result needs to be parsed into for the XML ?

    Thanks.

  2. #2
    Join Date
    Jan 2011
    Posts
    19

    Default Re: How to create new charts using DashletGenericChart() - 5.5.x

    I found this :

    http://media.sugarcrm.com/50tutorial...ing/index.html

    And various threads like :

    http://www.sugarcrm.com/forums/showt...ighlight=chart

    http://www.sugarcrm.com/forums/showt...d=1#post108452

    etc.

    Though all seem to point to the fact that either get Pro, or you're wading though undocumented code to figure it out, is that the case ?

    Going to have a look at this now : http://www.sugarcrm.com/forums/showp...5&postcount=23

  3. #3
    Join Date
    Jan 2011
    Posts
    19

    Default Re: How to create new charts using DashletGenericChart() - 5.5.x

    Does anyone know what format or structure

    Code:
    $sugarChart->data_set
    Should be in ?

  4. #4
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: How to create new charts using DashletGenericChart() - 5.5.x

    data_set is an array of fetched rows from database, as can be seen at SugarChar::getData()

    Cheers
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

  5. #5
    Join Date
    Jan 2011
    Posts
    19

    Default Re: How to create new charts using DashletGenericChart() - 5.5.x

    Quote Originally Posted by andopes View Post
    data_set is an array of fetched rows from database, as can be seen at SugarChar::getData()

    Cheers
    Indeed I found that - though I need to find the structure of that array and what fields are expected for each graph type to be able to ensure it's created correctly.

    It's not key value or straight array as there would be with jpgraph, there are other things going on.

    A link to the documentation of what is expected in the XML would be ideal if it exists ?

    Has http://www.sugardev.net/ been taken down ? as it's the only place I can find any class reference at all :

    http://webcache.googleusercontent.co...www.google.com

  6. #6
    Join Date
    Jan 2011
    Posts
    19

    Default Re: How to create new charts using DashletGenericChart() - 5.5.x

    In the Pro version is there actually Pro developer documentation or existing development that allows the creation of custom charts ?


    Off to decompile the Flash now to see if there are any clues in there.
    Last edited by Jeremy Hutchings; 2011-02-14 at 07:24 PM.

  7. #7
    Join Date
    Jan 2011
    Posts
    19

    Default Re: How to create new charts using DashletGenericChart() - 5.5.x

    It would appear to get the XML format expected by the SWF you have to decompile it with something like flare and then reverse engineer the code.

    Which is what I've done.

    It seems a little extreme ........ maybe having some even half decent developer documentation would be an idea to support the growth of this project. Any ideas what happened to the sugardev site ?
    Last edited by Jeremy Hutchings; 2011-02-15 at 07:51 PM.

  8. #8
    Join Date
    Jan 2011
    Posts
    19

    Default Re: How to create new charts using DashletGenericChart() - 5.5.x

    If in doubt (or with no documentation and near code obfuscation) write your own !

    http://www.jeremyhutchings.com/2011/...rm-graphs.html

  9. #9
    agcopley is offline Sugar Community Member
    Join Date
    Nov 2007
    Location
    Santiago, Chile
    Posts
    204

    Default Re: How to create new charts using DashletGenericChart() - 5.5.x

    Nice work Mr Hutchins and thanks for the contribution!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Create own custom charts
    By Klyn in forum Developer Help
    Replies: 6
    Last Post: 2011-03-15, 02:54 PM
  2. Problemas con DashletGenericChart en Sugar v5.2
    By josejosemx in forum Español
    Replies: 1
    Last Post: 2009-01-18, 01:53 AM
  3. create charts in dashboard
    By kris1363 in forum Developer Help
    Replies: 0
    Last Post: 2007-10-24, 11:20 AM
  4. create charts in dashboard
    By kris1363 in forum Installation and Upgrade Help
    Replies: 0
    Last Post: 2007-10-24, 11:10 AM
  5. How to create new charts on Dashboard
    By jchaven in forum Developer Help
    Replies: 2
    Last Post: 2005-07-09, 05:14 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •