PHP code example of jaxon-php / jaxon-flot

1. Go to this page and download the library: Download jaxon-php/jaxon-flot library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

jaxon-php / jaxon-flot example snippets


    $plot = $response->flot->plot('#flot-container');

    $graph = $plot->graph(['label' => 'Plot example', 'lines' => ['show' => true]]);

    $graph->series()->points([[0, 3], [4, 8], [8, 5], [9, 13]]);

    $graph->series()->expr(0, 14, 0.5, 'Math.sqrt(x * 10)');

    $ticks = [];
    for($i = 0; $i < 10; $i++) $ticks[] = [$i, 'Pt' . $i];
    $plot->xaxis()->points($ticks);

    $plot->width('600px')->height('300px');

    $response->flot->draw($plot);
json
""jaxon-php/jaxon-flot": "~1.0"
}