Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
36 lines (27 sloc) 841 Bytes

Jason Roman's Flot Bundle

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);