Results 1 to 7 of 7

Thread: Chart Scale max jumps to 10,000 with opp > 1 million!!! please help...

  1. #1
    maxcrm is offline Sugar Community Member
    Join Date
    Jan 2006
    Posts
    14

    Unhappy Chart Scale max jumps to 10,000 with opp > 1 million!!! please help...

    All,

    after upgrading to 4.2.0d, i noticed that my dashboard and mypipelin chart scale is out of order! now, if i enter any opportunity that is more than 1 million, 10,000 K becomes my max value on the chart! that means, if your highest opportunity was 2 million and lowest 100,000 then the smaller opp bars will look very tiny! and the chart is out of order!

    anyone had this issue? how can you fix the scale? i looked under module/charts but no luck!

    Thanks for your help

    Max

  2. #2
    filcole is offline Sugar Community Member
    Join Date
    Feb 2006
    Posts
    76

    Default Re: Chart Scale max jumps to 10,000 with opp > 1 million!!! please help...

    Quote Originally Posted by maxcrm
    anyone had this issue? how can you fix the scale? i looked under module/charts but no luck!
    I've noticed this. I think it's a bug thats been introduced in 4.2

  3. #3
    maxcrm is offline Sugar Community Member
    Join Date
    Jan 2006
    Posts
    14

    Default Re: Chart Scale max jumps to 10,000 with opp > 1 million!!! please help...

    Quote Originally Posted by maxcrm
    All,

    after upgrading to 4.2.0d, i noticed that my dashboard and mypipelin chart scale is out of order! now, if i enter any opportunity that is more than 1 million, 10,000 K becomes my max value on the chart! that means, if your highest opportunity was 2 million and lowest 100,000 then the smaller opp bars will look very tiny! and the chart is out of order!

    anyone had this issue? how can you fix the scale? i looked under module/charts but no luck!

    Thanks for your help

    Max
    is this issue not that important? hummmm!

  4. #4
    niels is offline Sugar Community Member
    Join Date
    Jan 2006
    Location
    The Netherlands
    Posts
    10

    Default Re: Chart Scale max jumps to 10,000 with opp > 1 million!!! please help...

    I noticed the same thing (well at least the sales department did ) This behaviour seems to be caused by the get_max function in include/charts/Charts.php, apparently this has changed. I created a function to replace it in the current one as a quick fix, but an easier solution might be to replace it with the one from 4.0:

    PHP Code:
    function get_max($numbers) {
            
    $num_len =  strlen(floor(max($numbers)))-1;
            
    $whole=pow(10,$num_len);
            
    $dec=1/$whole;
            
    $max ceil(max($numbers)*$dec)*$whole;
            return 
    $max;

    I have not tested this so backup the file first.

  5. #5
    ldebernardini's Avatar
    ldebernardini is offline Sugar Community Member
    Join Date
    Jul 2005
    Location
    Vicenza - Italy
    Posts
    104

    Default Re: Chart Scale max jumps to 10,000 with opp > 1 million!!! please help...

    Same problem for me with the 4.2b.

    Luigi

  6. #6
    ldebernardini's Avatar
    ldebernardini is offline Sugar Community Member
    Join Date
    Jul 2005
    Location
    Vicenza - Italy
    Posts
    104

    Default Re: Chart Scale max jumps to 10,000 with opp > 1 million!!! please help...

    I've replaced the code with the 4.0 version and it seems to work. I tested it on my test installation and now I've deployed it even on the official one. No problem seems to arise.


    Luigi

  7. #7
    filcole is offline Sugar Community Member
    Join Date
    Feb 2006
    Posts
    76

    Default Re: Chart Scale max jumps to 10,000 with opp > 1 million!!! please help...

    Thanks for the heads up niels. I've simplified (I think!) the code to:

    PHP Code:
    function get_max($numbers) {
        
    /* START - BUG FIX - FILCOLE 14/06/2006 */
        
    $max max($numbers);
        if (
    $max 1)
            return 
    $max
        $base 
    pow(10floor(log10($max)));
        return 
    ceil($max/$base) * $base;
        
    /* END - BUG FIX - FILCOLE 14/06/2006 */

    It will now round to the nearest multiple of 10, 100, 1000, 10,000, etc. I've incorporated this into an updated release of ScalePipeline that works with 4.2b+
    If you find the modules I've updated to 4.0 and above useful please take a look at my Amazon wishlist.

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
  •