Jump to content

charts Highcharts


Laurent

Recommended Posts

hello

can someone help me with the Highcharts?

i have this code and i wanted to implement it in my pireps view report

<?php
if(isset($pirep))
$pirep = $pirep;
 
/* pull data from rawdata */
 
$res = @unserialize($pirep->rawdata);
if($res !== false)
{
    $pirep->rawdata = $res;
    unset($res);
}

$json = ''; 
 
if(is_array($pirep->rawdata['points']))
{    
    foreach($pirep->rawdata['points'] as $point)
    {
        $time = str_replace('[', '', $point['time']);
        $time = str_replace(']', '', $time);
        $time = str_replace('l', '', $time);
        $alt = $point['alt'];
        $gs = $point['gs'];      
        $json .= "['{$time}', {$alt}, {$gs}],";
    }
    
    $json = rtrim($json, ',');
}
?>

thanks 

Laurent

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...