wdmg/yii2-chartjs 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

wdmg/yii2-chartjs

最新稳定版本:1.0.7

Composer 安装命令:

composer require wdmg/yii2-chartjs

包简介

Chart widget for Yii2 based on Chart.js

README 文档

README

Progress Github all releases GitHub version Progress GitHub license

Yii2 ChartJS widget

Chart widget for Yii2 based on Chart.js

Requirements

  • PHP 5.6 or higher
  • Yii2 v.2.0.33 and newest
  • Chart.js v.2.7.3 and newest.

Installation

To install the widget, run the following command in the console:

$ composer require "wdmg/yii2-chartjs"

Usage

<?php

use wdmg\widgets\chartjs;
...

echo ChartJS::widget([
    'type' => 'line',
    'options' => [
        'width' => 640,
        'height' => 260
    ],
    'data' => [
        'labels' => ["Red", "Blue", "Yellow", "Green", "Purple", "Orange"],
        'datasets' => [
            [
                'label'=> 'Bob',
                'data' => [5, 8, 12, 10, 7, 13],
                'backgroundColor' => [
                    'rgba(54, 162, 235, 0.2)'
                ],
                'borderColor' => [
                    'rgba(54, 162, 235, 1)'
                ],
                'borderWidth' => 1
            ],
            [
                'label'=> 'Alice',
                'data' => [6, 8, 10, 6, 4, 12],
                'backgroundColor' => [
                    'rgba(255, 99, 132, 0.2)'
                ],
                'borderColor' => [
                    'rgba(255,99,132,1)'
                ],
                'borderWidth' => 1
            ]
        ]
    ]
]);

?>

Options

See more on Creating a Chart

Status and version

  • v.1.0.7 - Update copyrights
  • v.1.0.6 - Up to date dependencies
  • v.1.0.5 - Fixed deprecated class declaration
  • v.1.0.4 - Update Yii2 version
  • v.1.0.3 - Update Yii2 version

统计信息

  • 总下载量: 1.72k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 5
  • 点击次数: 0
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 5
  • Watchers: 3
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-02-11