nlybe/charts_api
Composer 安装命令:
composer require nlybe/charts_api
包简介
FusionCharts integration on Elgg
README 文档
README
Chart.js integration in Elgg. This plugin offers an API which can be used from other plugins on Elgg platforms in order to populate information in charts using the Chart.js.
At the moment plugin offers the option to create a simple Bar Chart.
How to Use
The sample code below will create a Bar Chart.
// set an array with labels $ch_labels = []; // set an array with data $ch_data = []; $entities = elgg_get_entities($options); foreach (entities as $e) { array_push($ch_labels, $e->title); array_push($ch_data, calculate_likes($e)); } $vars['ch_labels'] = $ch_labels; $vars['ch_data'] = $ch_data; echo elgg_view('charts_api/charts_api', $vars);
Future Tasks List
- Make a class for charts, so all parameters will be passed by using methods of this class
- Integrate more options from Chart.js like select type of chart, chart styling etc
统计信息
- 总下载量: 39
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0
- 更新时间: 2016-11-20