PHP code example of imreallyunoriginal / plottwist

1. Go to this page and download the library: Download imreallyunoriginal/plottwist 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/ */

    

imreallyunoriginal / plottwist example snippets


Chart::radar('Test Chart', [
    Chart::dataset('Test 1', [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]),
    Chart::dataset('Test 2', [12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]),
])->setLabels(['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'])

Chart::line('Chart Title')
    ->addDataset('Dataset 1 Label', [
        'Label 1' => 16,
        'Label 2' => 32,
        'Label 3' => 10,
        'Label 4' => 12,
        'Label 5' => 10,
    ])