Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
chartjs_api
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
chartjs_api
Commits
92025b7c
Commit
92025b7c
authored
1 year ago
by
Gajanan Wasnik
Committed by
Carlos Busto Capeáns
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
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
!2
Issue #3344868: Replace README.txt with README.md and update README.md file
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+38
-12
38 additions, 12 deletions
README.md
with
38 additions
and
12 deletions
README.md
+
38
−
12
View file @
92025b7c
# 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 la
s
test 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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment