Results 1 to 6 of 6

Thread: Dashboards - Help

  1. #1
    jeffbrumbaugh is offline Sugar Community Member
    Join Date
    Feb 2008
    Posts
    20

    Default Dashboards - Help

    Dashboard charts are displaying values in thousands (i.e. 23K instead of 23,000 ). Does anyone know how to change this and all the corresponding copy that references value in "K" ?

    sugar version 5.0.0e
    windows server

  2. #2
    eNick is offline Sugar Community Member
    Join Date
    Apr 2008
    Location
    UK
    Posts
    282

    Post Re: Dashboards - Help

    /include/SugarCharts/SugarChart.php

    Line 686
    Code:
    $data .= $this->processDataGroup(4, $new_data[$groupByKey][$i][$drill_down],
    		    $sub_amount,
    		    $this->currency_symbol . $sub_amount . 'K',
    		     $url . $drill_down_param );
    Also in each individual dashlet there are references such as this...

    modules/Charts/Dashlets/MyPipelineBySalesStageDashlet/MyPipelineBySalesStageDashlet.php line 340....

    Code:
            $sugarChart->thousands_symbol = translate('LBL_OPP_THOUSANDS', 'Charts');
            
            $subtitle = translate('LBL_OPP_SIZE', 'Charts') . " " . $currency_symbol . "1" . translate('LBL_OPP_THOUSANDS', 'Charts');
    T H E S U G A R R E F I N E R Y
    : : : SugarCrm Customisation and Integration Services : : :

    SugarCRM Systems Integration Partner
    Trusted with SugarCRM
    http://www.theSugarRefinery.com ::: sales@{removethis}theSugarRefinery.com

  3. #3
    jeffbrumbaugh is offline Sugar Community Member
    Join Date
    Feb 2008
    Posts
    20

    Default Re: Dashboards - Help

    Thanks for the quick reply. Do I simply comment out those lines or is there another value I need to add?

  4. #4
    eNick is offline Sugar Community Member
    Join Date
    Apr 2008
    Location
    UK
    Posts
    282

    Default Re: Dashboards - Help

    No you need to edit some of the code. It's not helped that it's in slightly different places in each dashlet so you can't just do this blindly, you need to understand what it's doing.


    However, in SugarChart.php, changing the code from about line 663 from...
    $data .= $this->tab('<group>',2);
    $data .= $this->tab('<title>' . $groupByKey . '</title>',3);
    $data .= $this->tab('<value>' . $amount . '</value>',3);
    $data .= $this->tab('<label>' . $this->currency_symbol . $amount . 'K</label>',3);
    $data .= $this->tab('<link>' . $url . '</link>',3);

    to...
    $data .= $this->tab('<group>',2);
    $data .= $this->tab('<title>' . $groupByKey . '</title>',3);
    $data .= $this->tab('<value>' . $amount*1000 . '</value>',3);
    $data .= $this->tab('<label>' . $this->currency_symbol . $amount*1000 . '</label>',3);
    $data .= $this->tab('<link>' . $url . '</link>',3);

    ...multiplies the value back up by 1000 and removes the K from the labels.

    You then need to make similar changes to the titles, and similar changes to the drilldown popup (when you hold the mouse over the bar charts?)

    As I said, some of these are on different lines in each dasahlet so you're going to need to look through the code and understand what it's doing.

    You can also edit the query so it never divides the value by 1000 in the first place.
    T H E S U G A R R E F I N E R Y
    : : : SugarCrm Customisation and Integration Services : : :

    SugarCRM Systems Integration Partner
    Trusted with SugarCRM
    http://www.theSugarRefinery.com ::: sales@{removethis}theSugarRefinery.com

  5. #5
    jeffbrumbaugh is offline Sugar Community Member
    Join Date
    Feb 2008
    Posts
    20

    Default Re: Dashboards - Help

    Thank you so much for you help. I already removed the /1000 statement from the query, not sure why they did it that way. If you have an opportunity under 1,000 it would show as 0K. Again, thank you for your help.

  6. #6
    eNick is offline Sugar Community Member
    Join Date
    Apr 2008
    Location
    UK
    Posts
    282

    Default Re: Dashboards - Help

    I already removed the /1000 statement from the query, not sure why they did it that way
    I guess it's a "think big, earn big" thing!

    But yeah, it could be more sensible when summarising it - though wouldn't $250 show as $0.25k?

    Anyway, looks like you're on top of it all and able to customise it to your needs now. Good luck.
    T H E S U G A R R E F I N E R Y
    : : : SugarCrm Customisation and Integration Services : : :

    SugarCRM Systems Integration Partner
    Trusted with SugarCRM
    http://www.theSugarRefinery.com ::: sales@{removethis}theSugarRefinery.com

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Losing Dashboards in 4.5.1 => 5.0.0b Upgrade
    By tbivans in forum Developer Help
    Replies: 0
    Last Post: 2008-03-26, 01:37 PM
  2. Sugar Suite Download New Dashboards
    By HCMC in forum Downloads
    Replies: 0
    Last Post: 2007-07-31, 03:08 AM
  3. SugarSuite 4.0 - Customizable dashboards
    By manoj in forum Feature Requests
    Replies: 1
    Last Post: 2005-11-27, 02:06 PM

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
  •