Skip to content
Snippets Groups Projects
Commit 92025b7c authored by Gajanan Wasnik's avatar Gajanan Wasnik Committed by Carlos Busto Capeáns
Browse files

Issue #3344868: Replace README.txt with README.md and update README.md file

parent ff4b97d1
No related branches found
No related tags found
1 merge request!2Issue #3344868: Replace README.txt with README.md and update README.md file
# ChartJS API
## Introduction
Integration API with the ChartJS library that provides a "render element"
for generating graphs.
This module provides an integration API with the ChartJS library that provides
"a graph render element" for generating graphs.
In addition to the standard graphs of GraphJS, a new type called "halfdonut"
is added. With this, from a doughnut type graph, "half doughnut" type graphs
can be generated.
For a full description of the module, visit the
[project page](https://www.drupal.org/project/chartjs_api).
Submit bug reports and feature suggestions, or track changes in the
[issue queue](https://www.drupal.org/project/issues/chartjs_api).
## Table of contents
- Requirements
- Installation
- Configuration
- Maintainers
## Requirements
This module requires no modules outside of Drupal core.
## Installation and configuration
## Installation
ChartJS API Plugin can be installed like any other Drupal module.
Place it in the modules directory for your site and enable it
on the `admin/modules` page.
This module use lastest version of ChartJS.js library from CDN.
This module use latest version of ChartJS.js library from CDN.
Parameters for "render element" array:
- data: Array with labels and datasets with same structure
......@@ -28,11 +42,23 @@ than the ChartJS.js library.
This plugin display the title inside half doughnut.
- type: chartjs_api
You can find more info in ChartJs documentation:
http://www.chartjs.org/docs/latest/
## Configuration
Example of use:
# Bar graph.
1. Download and extract the ChartJS API module into your Drupal site.
2. Go to admin/build/modules and activate "Chartjs API" module.
Chart.js comes with a sound default configuration, making it very easy to
start with and get an app that is ready for production.
You can find more info in
[ChartJs documentation](http://www.chartjs.org/docs/latest/)
## Maintainers
- Carlos Busto Capeáns - [cbccharlie](https://www.drupal.org/u/cbccharlie)
#### Usage Examples
- Bar graph.
$build['mychart'] = [
'#data' => [
'labels' => ['January', 'February', 'March'],
......@@ -56,7 +82,7 @@ $build['mychart'] = [
'#type' => 'chartjs_api',
];
# Half doughnut graph.
- Half doughnut graph.
$build['mychart'] = [
'#data' => [
'labels' => ['Blue', 'Red', 'Grey'],
......@@ -78,4 +104,4 @@ $build['mychart'] = [
],
'#plugins' => ['halfdonutTotal'],
'#type' => 'chartjs_api',
];
];
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment