jasonroman / flot-bundle

Jason Roman 的 Flot Bundle for Symfony2

安装数量: 1,275

依赖关系: 0

建议者: 0

安全性: 0

星标: 0

关注者: 2

分支: 0

开放问题: 0

类型:symfony-bundle

1.0 2014-04-15 04:14 UTC

This package is not auto-updated.

Last update: 2024-09-28 16:15:22 UTC


README

此包需要(并加载)jasonroman/flot 包。

安装

将包添加到您的 composer.json

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

app/AppKernel.php 中注册包

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

用法

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