Php chart legend. php file & lt ;? Phpinclude & nbsp; 'd: \ xampp \ htdocs \ php-ofc-library \ open-flash-chart.php '; $ year & nbsp; = & nbsp; array (); & nbsp; $ price & nbsp ;=& nbsp; a php chart
Legend. php file
Include 'd: \ xampp \ htdocs \ php-ofc-library \ open-flash-chart.php ';
$ Year = array ();
$ Price = array ();
$ Year [] = '000000 ';
$ Price [] = 36.7;
$ Year [] = '000000 ';
$ Price [] = 38.7;
$ Year [] = '000000 ';
$ Price [] = 42.8;
$ Year [] = '000000 ';
$ Price [] = 38.2;
$ Year [] = '000000 ';
$ Price [] = 37.8;
$ Year [] = '000000 ';
$ Price [] = 34.7;
$ Year [] = '000000 ';
$ Price [] = 38.4;
$ Year [] = '000000 ';
$ Price [] = 40.2;
$ Year [] = '000000 ';
$ Price [] = 39.5;
$ Year [] = '000000 ';
$ Price [] = 40.3;
$ Year [] = '000000 ';
$ Price [] = 45.9;
$ Year [] = '000000 ';
$ Price [] = 48.9;
$ Year [] = '000000 ';
$ Price [] = 50.9;
$ Year [] = '000000 ';
$ Price [] = 52.9;
$ Year [] = '000000 ';
$ Price [] = 57.9;
$ Year [] = '000000 ';
$ Price [] = 60.9;
$ Year [] = '000000 ';
$ Price [] = 61.9;
$ Year [] = '000000 ';
$ Price [] = 76.9;
$ Year [] = '000000 ';
$ Price [] = 77.9;
$ Year [] = '000000 ';
$ Price [] = 69.9;
$ Year [] = '000000 ';
$ Price [] = 77.9;
$ Year [] = '000000 ';
$ Price [] = 77.9;
$ Year [] = '000000 ';
$ Price [] = 79.9;
$ Year [] = '000000 ';
$ Price [] = 88.9;
$ Year [] = '000000 ';
$ Price [] = 87.9;
$ Year [] = '000000 ';
$ Price [] = 103.9;
$ Chart = new open_flash_chart ();
$ Title = new title ('UK Petrol price (pence) per litre ');
$ Title-> set_style ("{font-size: 20px; color: # A2ACBA; text-align: center ;}");
$ Chart-> set_title ($ title );
$ Area = new area ();
$ Area-> set_colour ('#5B56B6 ');
$ Area-> set_values ($ price );
$ Area-> set_key ('price', 12 );
$ Chart-> add_element ($ area );
$ X_labels = new x_axis_labels ();
$ X_labels-> set_steps (2 );
$ X_labels-> set_vertical ();
$ X_labels-> set_colour ('# a2acba ');
$ X_labels-> set_labels ($ year );
$ X = new x_axis ();
$ X-> set_colour ('# a2acba ');
$ X-> set_grid_colour ('# D7E4A3 ');
$ X-> set_offset (false );
$ X-> set_steps (4); // Add the X Axis Labels to the X Axis
$ X-> set_labels ($ x_labels );
$ Chart-> set_x_axis ($ x); // LOOK ://
$ X_legend = new x_legend ('2017 to 123 ');
$ X_legend-> set_style ('{font-size: 20px; color: #778877 }');
$ Chart-> set_x_legend ($ x_legend); // remove this when the Y Axis is smarter //
$ Y = new y_axis ();
$ Y-> set_range (0,150, 30 );
$ Chart-> add_y_axis ($ y );
Echo $ chart-> toPrettyString ();
Json_encode ($ year );
Json_encode ($ price );
?>
Test.html file
Script
Swfobject. embedSWF ("D: \ xampp \ htdocs \ FirstProject \ open-flash-chart.swf", "my_chart ",
"600", "350", "9.0.0 ",
"D: \ xampp \ htdocs \ FirstProject \ expressInstall.swf ",
{"Data-file": "D :\\ xampp \ htdocs \ FirstProject \ OpenFlashChart \ legend. php "});
Script
Hello World
Developed with eclipse pdt, prompt during runtime
Open Flash Chart
JSON Parse Error [Syntax Error]
Error at character 0, line 1:
0: