My pie chart is backwards. How do I switch this pie around? The code is below. Or if someone has a more updated code post it here.
Thanks,
Ryan
<?php
//Make piechart
$testtime = substr($hoursofpossibledaylight,0,2);
$testminute = substr($hoursofpossibledaylight,3,2);
$testminute=$testminute/60;
$testresult=$testtime+$testminute;
$testljus=round(($testresult/24)*100,1);
$testmorker=100-$testljus;
?>
<span class="thisPage" style="position: relative; font-weight:lighter">
<?php
$time_arr = explode(':', $hoursofpossibledaylight, 2);
echo (int)$time_arr[0] . " hrs " . (int)$time_arr[1] . " min";
echo '<br/>of Daylight Today<br/>';
?>
</span>
<img style="margin-top:4px" src="http://chart.apis.google.com/chart?chs=185x100&chma=0,0,0,0&chd=t:<?php echo $testmorker;?>,<?php echo $testljus;?>&cht=p3&chp=1.6&chf=bg,s,ffffff&chco=ffd700,000000" alt="graph"/>
<br />
<span style="position:relative; float:left; margin-top:-60px; margin-left:34px; font-weight:lighter; color:#000000"> <!-- was -5 -->
<?php echo $testmorker . "%"; ?>
</span>
<span style=" position:relative; float:right; margin-top:-47px; margin-right:40px; font-weight:lighter; color:#ffffff"> <!-- was 5 -->
<?php echo $testljus . "%"; ?>
</span>
<span class="thisPage" style=" position:relative; font-weight:lighter; top:-8px">
<?php
echo '<br/>Which is <br/>';
$time_arr = explode(':', $changeinday);
if (substr($time_arr[0],0,1) != "-") { // -0 when getting shorter
echo (int)$time_arr[1] . " min Longer";
} else {
echo (int)$time_arr[1] . " min Shorter";
}
echo ('<br />Than Yesterday');
?>