Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: How to create new chart?

  1. #1
    bhavin13 is offline Member
    Join Date
    Apr 2006
    Posts
    5

    Question How to create new chart?

    Hello there,

    Looking for help/guidelines to create new chart in SugarCRM Open Source Version 4.0.1e.
    I have checked some documentation, this forum and code also.

    I want to add new chart based on my query how to create new flash chart or customize exisisting chart.
    If flash chart is not possible then other way to create new chart is also ok.

    Thanks
    bhavin

  2. #2
    atheimer98 is offline Sugar Community Member
    Join Date
    Dec 2005
    Posts
    202

    Default Re: How to create new chart?

    I would love to learn this as well but in the meantime you may be interested to know that I've received bids from a outsourcing site for around $300 for a page full of custom dashboards, not terribly bad for real time reporting.
    You might want to look at Zucker Reports Pro it's supposed to have this feature to their Pro version but it does not support it yet.

  3. #3
    julian's Avatar
    julian is offline Sugar Team Member
    Join Date
    Sep 2004
    Posts
    1,639

    Default Re: How to create new chart?

    Hello bhavin,

    Charts have changed quite a bit since 4.0.1-- you may consider upgrading to 4.2 before you make your modifications. See ./modules/Charts/code/.
    Julian Ostrow
    Systems and Applications Engineer
    SugarCRM Inc.

  4. #4
    velocitygirl is offline Sugar Community Member
    Join Date
    Jan 2006
    Location
    Berlin, Germany
    Posts
    21

    Default Re: How to create new chart?

    I added a new chart to the dashboard and that's a short description of the way i did it. i am not sure if this is what you are looking for and it surely isn't the most elegant way but at least it adds a new chart

    What I would like to know is how to add a new chart without the risk of losing it with the next upgrade.

    ok and here is what i did to add a new chart:
    1.copy one of the chart files in modules/Charts/code
    2.rename it (for example: Chart_mychart.php)
    3.go into “predefined_charts.php” in modules/Charts/code and add new entry to $predefined_charts array: 'Chart_mychart' => array('type'=>'code','id'=>'Chart_mychart','label' =>'My Chart')
    4.go to your newly created “Chart-mychart.php” and replace all “original_chart”-variables with your “mychart”-term
    5.in modules/Charts/language/en_us.lang.php (or whatever language file you are using) you'll find variables to set titles and descriptions of your new chart. You need to search for the affected variables and add your names (e.g. LBL_MYCHART_TITLE and the value for it) and adjust the variables in the “Chart-mychart.php”
    6.go to your sugar system and open dashboard
    7.“your chart” should now be visible in the “add a chart”-dropdown (the name in the menu is the “label” value you add in “predefined_charts.php)
    8.once your new chart is visible you can go on adding the required functionality to your file or adjusting the existing one)
    9.the function ‘gen_xml’ generates the XML that is used to create the Flash-chart
    10.create_chart at the very end of the file defines the type of chart being displayed
    11.the .fla-files are saved in include/charts

    rgds, velocitygirl

  5. #5
    bhavin13 is offline Member
    Join Date
    Apr 2006
    Posts
    5

    Default Re: How to create new chart?

    Where can I find specification for xml which is used to generate pie chart or other chart.
    Sample xml file is also useful if anybody have it then please post here.

    Thanks
    Last edited by bhavin13; 2006-04-18 at 05:49 AM.

  6. #6
    bhavin13 is offline Member
    Join Date
    Apr 2006
    Posts
    5

    Default Re: How to create new chart?

    Quote Originally Posted by velocitygirl
    I added a new chart to the dashboard and that's a short description of the way i did it. i am not sure if this is what you are looking for and it surely isn't the most elegant way but at least it adds a new chart

    What I would like to know is how to add a new chart without the risk of losing it with the next upgrade.

    ok and here is what i did to add a new chart:
    1.copy one of the chart files in modules/Charts/code
    2.rename it (for example: Chart_mychart.php)
    3.go into “predefined_charts.php” in modules/Charts/code and add new entry to $predefined_charts array: 'Chart_mychart' => array('type'=>'code','id'=>'Chart_mychart','label' =>'My Chart')
    4.go to your newly created “Chart-mychart.php” and replace all “original_chart”-variables with your “mychart”-term
    5.in modules/Charts/language/en_us.lang.php (or whatever language file you are using) you'll find variables to set titles and descriptions of your new chart. You need to search for the affected variables and add your names (e.g. LBL_MYCHART_TITLE and the value for it) and adjust the variables in the “Chart-mychart.php”
    6.go to your sugar system and open dashboard
    7.“your chart” should now be visible in the “add a chart”-dropdown (the name in the menu is the “label” value you add in “predefined_charts.php)
    8.once your new chart is visible you can go on adding the required functionality to your file or adjusting the existing one)
    9.the function ‘gen_xml’ generates the XML that is used to create the Flash-chart
    10.create_chart at the very end of the file defines the type of chart being displayed
    11.the .fla-files are saved in include/charts

    rgds, velocitygirl
    Thanks velocitygirl
    You have given valuable information.

  7. #7
    velocitygirl is offline Sugar Community Member
    Join Date
    Jan 2006
    Location
    Berlin, Germany
    Posts
    21

    Default Re: How to create new chart?

    Quote Originally Posted by bhavin13
    Where can I find specification for xml which is used to generate pie chart or other chart.
    Sample xml file is also useful if anybody have it then please post here.

    Thanks
    The XML gets generated in the gen_xml function in the Chart_...php files. You can take a look at the structure that is created in cache/xml and then the refering xml-file. You can change values there to see what impact it would have in Sugar.

    Hope that helps,
    velocitygirl

  8. #8
    bhawin13 is offline Sugar Community Member
    Join Date
    Apr 2006
    Posts
    45

    Default Re: How to create new chart?

    I tried to check cache /xml/???.....xml file.

    But I have cache file for only barchart. I think there is 8 to 9 type of chart. I have created new custom bar chart studying existing cache xml file, but not able to get format for other chart. If I can get xml file for other chart then I can create other type of charts also.

    So I am waiting for sample xml file for other charts.

    Thanks
    bhavin13
    ________
    lolol
    Last edited by bhawin13; 2011-01-24 at 07:31 AM.

  9. #9
    velocitygirl is offline Sugar Community Member
    Join Date
    Jan 2006
    Location
    Berlin, Germany
    Posts
    21

    Default Re: How to create new chart?

    Hello again,
    the Pipeline_by_lead_source-xml (which are all opportunities by lead source) should give you an xml-file for an oval graph, and the pipeline_by_sales_stage (= lead source by outcome) displays a horizontal bar graph. I haven't had a closer look at other graphs because I've only needed to display bar charts up to now. But would be interested in knowing how other graphs get created, too.

    Rgds, velocitygirl

  10. #10
    oracle is offline Sugar Community Member
    Join Date
    Mar 2006
    Posts
    14

    Default Re: How to create new chart?

    Quote Originally Posted by velocitygirl
    I added a new chart to the dashboard and that's a short description of the way i did it. i am not sure if this is what you are looking for and it surely isn't the most elegant way but at least it adds a new chart

    What I would like to know is how to add a new chart without the risk of losing it with the next upgrade.

    ok and here is what i did to add a new chart:
    1.copy one of the chart files in modules/Charts/code
    2.rename it (for example: Chart_mychart.php)
    3.go into “predefined_charts.php” in modules/Charts/code and add new entry to $predefined_charts array: 'Chart_mychart' => array('type'=>'code','id'=>'Chart_mychart','label' =>'My Chart')
    4.go to your newly created “Chart-mychart.php” and replace all “original_chart”-variables with your “mychart”-term
    5.in modules/Charts/language/en_us.lang.php (or whatever language file you are using) you'll find variables to set titles and descriptions of your new chart. You need to search for the affected variables and add your names (e.g. LBL_MYCHART_TITLE and the value for it) and adjust the variables in the “Chart-mychart.php”
    6.go to your sugar system and open dashboard
    7.“your chart” should now be visible in the “add a chart”-dropdown (the name in the menu is the “label” value you add in “predefined_charts.php)
    8.once your new chart is visible you can go on adding the required functionality to your file or adjusting the existing one)
    9.the function ‘gen_xml’ generates the XML that is used to create the Flash-chart
    10.create_chart at the very end of the file defines the type of chart being displayed
    11.the .fla-files are saved in include/charts

    rgds, velocitygirl
    Hi, i would like to use the pie-chart but to show the data from the 'Cases' module. I've foloow what you suggested in the list above, but i found that there are a lot to modify and i'm not sure which is which. Please advice me on this.

    Thank you very much.

    Regards,

    Oracle

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

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

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
  •