PHP code example of kalamurda / amcharts-bundle

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

    

kalamurda / amcharts-bundle example snippets

 php
       
       ...
       public function registerBundles()
       {
           $bundles = array(
               ...
               new \IK\AmChartsBundle\IKAmChartsBundle(),
               ...
           );
       ...
   

    $preperadArr = [
        [
            'column1' => 5,
            'column2' => 9,
            'date' => '2017-06-01'
        ],[
            'column1' => 5,
            'column2' => 9,
            'date' => '2017-06-02'
        ],[
            'column1' => 5,
            'column2' => 9,
            'date' => '2017-06-03'
        ],
        ......
    ];
    
    $dataProvider = new DataProvider($preperadArr);
    
    $chart = new CombinedBulletColumnLineChart();
    $chart->setTheme('dark');
    $chart->setDataProvider($dataProvider);  
  
    return $this->render('default/index.html.twig', [
        'chart' => $chart
    ]);