I need a PHP function that I will use within Wordpress. This PHP function will generate a rectangular (760x450 pixel) PNG file (example attached). The file is a graphical representation of some datapoints. The function will be called with an array of data points and will create a "graph" of those data points appearing on a standard background. The function might use libraries such as described here ( [url removed, login to view] ). The function will be called "save_mood_graph(...)".
Below I show an example of the function and how it might be called from within Wordpress.
<---- Example code snippet below
$my_data_array = array(2,5,1,9,10,8,10,9,2,8,10,8,10);
$my_destination_file = "/tmp/[url removed, login to view]";
save_mood_graph($my_data_array, $my_destination_file); // should generate a PNG in the destination location
function save_mood_graph($data_array, $destination_file)
// Your code here
* The only dynmic part of the graph is the white dots and the white lines between the white dots (see example image). The rest is a static image.
* A maximimum of 13 points can be displayed.
* Horizontal spacing between points is always the same.
* If there are less than 13 points, the left side of the graph will be empty. For example, if there is only one point in the data array, it will appear on the right hand side of the graph.
* All values in the array will always be one of the numbers 1,2,3,4,5,6,7,8,9,10 (it will never be bigger than 10 or smaller than 1)
* If a file already exists in the same location as the $destination_file, go ahead and overwrite
* The example snippet above should create a graph that looks exactly like the example image attached to this work item.
* The code must be valid and callable from within Wordpress. Code will not be accepted until it is called successfully from my wordpress site so I will be asking the developer to put an example function call in my wordpress site to demonstrate that it works.
I have included 2 image examples. The first image shows what the desired output would be. The second image has some explanatory text laid on top to help clarify what I want done.
12 freelanceria on tarjonnut keskimäärin %project_bid_stats_avg_sub_26% %project_currencyDetails_sign_sub_27% tähän työhön
Dear sir, I have over 10 years of experience in Web Development including PHP, MySQL, Wordpess, etc. I am a Zend Certified PHP Developer (ZCE). I can help you out with your troubles. Cheers!