jasonroman/flot-bundle

Jason Roman's Flot Bundle for Symfony2

Installs: 1 275

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:symfony-bundle

1.0 2014-04-15 04:14 UTC

This package is not auto-updated.

Last update: 2024-04-13 13:56:14 UTC


README

This bundle requires (and loads) the jasonroman/flot package.

Installation

Add the bundle to your composer.json

{
    "require": {
        "jasonroman/flot-bundle": "1.0.*@dev"
    }
}

Register the bundle in app/AppKernel.php

$bundles = array(
    // ...
    new JasonRoman\Bundle\FlotBundle\JasonRomanFlotBundle(),
);

Usage

// convert to Flot JSON data from PHP arrays
$flotData = $this->container->get('jasonroman.flot')->convert($data);
$flotData = $this->container->get('jasonroman.flot')->convert($data, 'horizontal');
$flotData = $this->container->get('jasonroman.flot')->convert($data, 'vertical', $datetime = true);
$flotData = $this->container->get('jasonroman.flot')->convert($pieData);