Does anyone know how to set the values for a pie chart in the Open Flash Chart 2?? i have like a percentage for a visitors sources, and i don't know how to display them , because they changed a lot of stuff in the v2
http://teethgrinder.co.uk/open-flash-chart-2/tutorial-4.php
what i have now in the data generating is this (from the examples) is this:
require_once('OFC/OFC_Chart.php');
$title = new OFC_Elements_Title( 'Area Chart' );
$pie = new OFC_Charts_Pie();
$pie->set_start_angle( 80 );
$pie->set_animate( true );
$chart = new OFC_Chart();
$chart->set_title( $title );
$chart->add_element( $pie );
$chart->x_axis = null;
echo $chart->toPrettyString();
that produces:
{ "title": { "text": "Area Chart" }, "elements": [ { "type": "pie", "colours": [ "#d01f3c", "#356aa0", "#C79810" ], "alpha": 0.6, "border": 2, "values": [ 2, 3, { "value": 6.5, "text": "hello (6.5)" } ], "start-angle": 80, "animate": true } ], "x_axis": null }