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
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
/include/SugarCharts/SugarChart.php
Line 686
Also in each individual dashlet there are references such as this...Code:$data .= $this->processDataGroup(4, $new_data[$groupByKey][$i][$drill_down], $sub_amount, $this->currency_symbol . $sub_amount . 'K', $url . $drill_down_param );
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
Thanks for the quick reply. Do I simply comment out those lines or is there another value I need to add?
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
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.
I guess it's a "think big, earn big" thing!I already removed the /1000 statement from the query, not sure why they did it that way
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
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks