Home Forums Chart Support Legends showing only DataPoint Reply To: Legends showing only DataPoint

#7624

Thanks Anjali, but again I have the same problem, the exemples show how to do it with static data, and not with data retreived from databases, I’ve been trying to reuse this code at the php file:

{
        $point = array("legend" => $row['Descriptors'] , "y" => $row['Count']);
        array_push($data_points, $point);
    }
$length = sizeof($data_points);
                echo "[";
                for ( $i = 0; $i <= $length-1; $i++) { 
                        echo "{ \"legend\": \"" , $data_points[$i]['legend'],"\", \"y\": " , $data_points[$i]['y'], "}";
                        if( $i < $length-1)
                                echo ",";
                }
                echo "]";

but besides that I’m not sure that this is the way, I have no success with it…, thanks again