morgenstille/visual-heatmap-bundle

此包已被废弃,不再维护。未建议替代包。

生成热图。

安装: 12

依赖: 0

建议者: 0

安全: 0

星标: 1

关注者: 1

分支: 0

开放问题: 0

类型:symfony-bundle

dev-master 2013-05-30 21:18 UTC

This package is not auto-updated.

Last update: 2020-08-16 18:32:43 UTC


README

此Symfony2扩展包提供基本的生成热图功能。

它由几个部分组成

  • 服务 - 生成热图对象
  • 渲染器 - 提供不同的值到图像的转换
  • 热点 - 将值图上的峰值映射。
  • 热图 - 热图对象执行所有繁重的工作。

安装

  • 该包位于packagist。将"morgenstille/visual-heatmap-bundle": "master"添加到您的composer.json中。

  • 将 ``new Morgenstille\Visual\HeatmapBundle\MorgenstilleVisualHeatmapBundle(),``` 添加到您的AppKernel.php中。

  • 如果您想更新演示,请更新您的routing.yml

    morgenstille_visual_heatmap: resource: "@MorgenstilleVisualHeatmapBundle/Controller/" type: annotation prefix: /

使用

  • 获取您的热图 $heatmap = $this->get('morgenstille.visual.heatmap')->create($width, $height);.
  • 添加一个热点 $heatmap->add(new SpotInterpolate($x, $y, $radius, $intensity));
  • 渲染Png响应 $heatmap->renderPngResponse(new TransparentRenderer($heatmap->getMinValue(), $heatmap->getMaxValue()));

示例

查看示例控制器 [https://github.com/joemoe/visual-heatmap/blob/master/Controller/DemoController.php]