test
Viewing 15 posts - 1 through 15 (of 22 total)
  • Author
    Posts
  • branimir131 Friend
    #201857

    Hi,

    I would ask for help with dividers thousands (decimal) of pie chart (Ja google chart).
    I’m trying to change the way of displaying the amount in a balloon

    example:
    123.456000

    I need
    123.456.000,00

    Where can I change this value.

    thanks a lot

    jooservices Friend
    #551933

    Hi there,
    Have you tried with this php function:


    http://php.net/manual/en/function.number-format.php

    Thank you,
    Viet Vu

    branimir131 Friend
    #551934

    I watched and tried to insert into mod_jagooglechart.php, but failed. I would ask you if you could help me which part and where to insert.

    thanks a lot

    jooservices Friend
    #551935

    Hi there,
    For sure. Please provide me your site URL. I’ll help you to locate which file.

    Thank you,
    Viet Vu

    branimir131 Friend
    #551936

    i send link to PM. Thx

    jooservices Friend
    #551940

    Hi there,
    I have just checked and got this one:


    $js = "
    google.setOnLoadCallback({$funcChart});
    function {$funcChart}() {
    var data = google.visualization.arrayToDataTable(".json_encode($data).");
    var options = ".json_encode($options).";
    var chart = new google.visualization.{$chart}(document.getElementById('{$container}'));
    chart.draw(data, options);
    }";

    File

    mod_jagooglechart.php
    $data contain value for title & number.
    Well. $data is came from


    $data = array();
    for ($i=0;$i<count($rows);$i++) {
    $row = explode(',', $rows[$i]);
    $tmp = array();
    if($i==0) {
    //title
    foreach ($row as $cell) {
    $tmp[] = (string) trim($cell);
    }
    } else {
    for($j=0;$j<count($row);$j++) {
    if($j == 0) {
    $tmp[] = (string) (trim($row[$j]));//horizontal axis - item title
    } else {
    $tmp[] = (float) (trim($row[$j]));
    }
    }
    }
    $data[] = $tmp;
    }

    As you can see we’r using (float) variable type here


    $tmp[] = (float) (trim($row[$j]));

    You can change it into your format by use
    $tmp[] = number_format ( (float) (trim($row[$j])) , 2 );
    Please ref

    http://php.net/manual/en/function.number-format.php
    For detail and more options.

    Thank you,
    Viet Vu

    branimir131 Friend
    #551945

    i put this code:
    $tmp[] = number_format ( (float) (trim($row[$j])) , 2 );

    but no effect

    branimir131 Friend
    #551946

    Not see number in pie chart

    jooservices Friend
    #551947

    Hi there,
    I have you tried to clear cache. Or please provide me your FTP & backend access.I’ll try to help you.

    Thank you,
    Viet Vu

    branimir131 Friend
    #551948

    Unfortunately I can not give you the ftp details. Can you try to point out the problem.

    branimir131 Friend
    #551949

    Yes. I cleared the cache

    jooservices Friend
    #551950

    Hi there,
    # Please make sure you have cleared cache: Browser / Server etc.. and do Ctrl F5
    # To debug please insert this code

    print_r ($data);
    After


    $data[] = $tmp;
    }

    And give me this.

    In my localhost i only do read code to find out logic 🙂

    Thank you,
    Viet Vu

    branimir131 Friend
    #551952

    You can see now error message. Link page of my web

    jooservices Friend
    #551953

    Hi there


    Array ( [0] => Array ( [0] => Proracun [1] => kune )) Array ( [0] => Array ( [0] => Proracun [1] => kune )[1] => Array ( [0] => Prihodi od poreza [1] => 83,305,820.00 )) Array ( [0] => Array ( [0] => Proracun [1] => kune )[1] => Array ( [0] => Prihodi od poreza [1] => 83,305,820.00 )[2] => Array ( [0] => Prihodi od pomoći [1] => 31,168,438.00 ))

    Look like it’s valid format as you expected. Isn’t it ?
    It’s bit hard for me to inspect code without touching it 🙂

    Thank you,
    Viet Vu

    branimir131 Friend
    #551954

    Format is ok. But not see graph

Viewing 15 posts - 1 through 15 (of 22 total)

This topic contains 22 replies, has 2 voices, and was last updated by  branimir131 10 years, 2 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum