https://github.com/atlasoflivingaustralia/ala-charts-plugin
Grails Charts plugin that uses ALA services
https://github.com/atlasoflivingaustralia/ala-charts-plugin
ala-product-shared-ui chart grails
Last synced: 21 days ago
JSON representation
Grails Charts plugin that uses ALA services
- Host: GitHub
- URL: https://github.com/atlasoflivingaustralia/ala-charts-plugin
- Owner: AtlasOfLivingAustralia
- Created: 2016-02-28T13:04:00.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-05-03T04:08:09.000Z (about 2 years ago)
- Last Synced: 2025-04-01T13:12:44.278Z (2 months ago)
- Topics: ala-product-shared-ui, chart, grails
- Language: JavaScript
- Size: 475 KB
- Stars: 1
- Watchers: 21
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### [](https://travis-ci.org/AtlasOfLivingAustralia/ala-charts-plugin)
The grails2 branch contains the 1.3.x series of the plugin compatible with Grails 2.x
The master branch hosts version 2.x and forward of the plugin compatible with grails 3.x
The Angular-charts branch only support Angular application
## Why ?
Charts are used in multiple places within the Atlas.
This is an attempt to standardise the display of chart information
across the ALA. This plugin is currently only supporting charts
on top of biocache services but could be extended to include other
services (e.g. logger services, ecodata services).## Versions
* 1.3.x is built with grails 2.5.x and supports bootstrap 3
* 1.4.x is built with grails 3.x and supports bootstrap 3
* 2.2 is built with grails 4.x and supports bootstrap 3
* 2.1-ANGULAR-4 is a AngularJS version built with grails 4.x and supports bootstrap 3
* 2.3 is built with grails 5.x and supports bootstrap 3## Usage instructions
To use the plugin you need to set up a external JSON configuration file for the charts.
The configuration file should be placed in the location:```
/data/{appName}/config/charts.json
```Heres an example:
```
{ "biocache" : {
"cl1000" : {
"title": "By habitat",
"chartType": "doughnut",
"emptyValueMsg": "Habitat not specified",
"hideEmptyValues" : true
},
"month" : {
"title": "By month",
"chartType": "bar",
"emptyValueMsg": "Month not specified",
"hideEmptyValues" : true
},
"year" : {
"title": "Since 1990",
"chartType": "bar",
"emptyValueMsg": "Year not specified",
"hideEmptyValues" : true,
"filter": "fq=year:[1990 TO *]"
},
"decade" : {
"title": "By decade",
"chartType": "bar",
"emptyValueMsg": "Year not specified",
"hideEmptyValues" : true
},
"data_resource_uid" : {
"title": "By dataset",
"chartType": "horizontal-bar"
},
"data_provider_uid" : {
"title": "By data partner",
"chartType": "horizontal-bar",
"emptyValueMsg": "Partner not specified",
"hideEmptyValues" : true
}
}}
```## Configuration options
* title: The title to display over the top of this chart
* chartType: one of "horizontal-bar", "bar" or "doughnut"
* emptyValueMsg: What to display for a field name if non available,
* hideEmptyValues : Whether to hide empty values e.g. month not supplied
* filter: An additional query filter to be used in the searchFor biocache charts, the name of the chart must be an indexed and public field.
## Rendering the charts
To use the grails taglib to render the charts:
```
```