WordPress plugin intelligence profile

Greencharts

Another WordPress plugin with charts but with love for the earth in mind

WP PlugIndex snapshot

Current directory snapshot

Tested up to WordPress 6.1
Current version1.0.1
WordPress coverageTested up to WordPress 6.1
Minimum stackWP 5.0 · PHP 7.0
Directory statusactive
Last directory update14 Feb 20233y ago
Active installationsNewAdoption metric — not a quality score
WordPress.org ratingNo WordPress.org ratings yet
Official packageDirect from WordPress.org

Repository metrics are context, not quality scores. Active installations measure adoption and can strongly reflect a plugin’s age and historical popularity. Ratings, recent updates and “Tested up to” metadata also do not guarantee modern code, error-free operation, security, feature completeness or suitability for a particular site. Why active installs don’t tell the whole story →

WP PlugIndex currently records Greencharts version 1.0.1 as active, updated 3y ago and tested up to WordPress 6.1.

Overview

About this plugin

org API and the ChartJs library. The plugin has built-in mechanisms such as server cache, lazy load and client cache, which work together to reduce the CO2 emissions caused by internet/hardware usage per chart view.

Usage

Once the plugin is installed and configured, you can add chart shortcodes to your pages and posts. The available shortcodes are:

  • [greencharts-chart type="temperature"]: Displays a line chart of global temperature change over time.
  • [greencharts-chart type="co2"]: Displays a line chart of CO2 emissions by country.
  • [greencharts-chart type="methane"]: Displays a line chart of global methane gas emissions.
  • [greencharts-chart type="oceanwarming"]: Displays a line chart of global ocean warming.

You can customize the appearance of the charts using the ChartJs library’s options and callbacks using wordpress js hooks. Visit ChartJs documentation for more information.

Support

If you have any issues with the plugin, please open a Github issue or contact us via email. We will do our best to assist you.

Contribution

If you would like to contribute to the development of this plugin, please fork the repository and submit a pull request.

Disclaimer

This plugin is provided “as is” without warranty of any kind, either express or implied. org and ChartJs library do not endorse this plugin and are not responsible for any damages or losses that may result from its use.

Plugin hooks

php [docs](https://developer.wordpress.org/plugins/hooks/)

Use the apply_filters function to set a transient value to false. This will disable caching for the greencharts data.

apply_filters('greencharts_transient_disableCache', false);

Use the apply_filters function to set the lifespan of transient. The filter can be used to modify the lifespan of the transient before it is set. The transient is used to cache remote API requests, default transient is 1 month.

The lifespan should be the number of seconds, see $expiration parameter of wordpress set_transient function

apply_filters('greencharts_transient_lifespan', $this->lifespan, $this);

Use the apply_filters function to set a logger value to true. This will enable logging for the greencharts data.

apply_filters('greencharts_logger_shouldLog', defined('WP_DEBUG') && true === WP_DEBUG);

Use the apply_filters function to set a verbose value to true. This will enable verbose logging for the greencharts data.

apply_filters('greencharts_logger_shouldBeVerbose', false);

Uses the apply_filters function to alter ajax resposes data used by charts. Useful if you need to add more charts.

apply_filters('greencharts_ajax_chartsApi',$charts->getChartsDataByType($type), $type);

js [docs](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-hooks/)

addFilter BEFORE greencharts js load.

This code applies a filter to the chartConfig object which is used to create a greencharts_js_chartConfig chart on the canvas. The filter is used to modify the chartConfig object so that it can be used to create a customized chart.

backgroundColor = "blue"; return chartConfig; } );

This code applies a filter to the debug var that control operations logging. The filter is set to false, meaning that any code related to greencharts_js_debug will not be logged in the browser js console.

addFilter("greencharts_js_debug", "defaultHooks", () => true);

This code applies a filter to the “greencharts_js_errorMessage” string. The filter takes in the string, along with the data and error objects, and returns a modified version of the string. This is useful for customizing error messages based on different scenarios.

applyFilters( "greencharts_js_errorMessage", "Something goes wrong during chart loading. Please retry later", data, error );

This code applies a filter to the text of a “Reset zoom” button on a canvas element. This allows developers to customize the text of the button.

applyFilters( "greencharts_js_resetZoomButtonText", "Reset zoom", canvas );

This code applies a filter to the text of a “Load chart” button on a canvas element. This allows developers to customize the text of the button.

applyFilters( "greencharts_js_loadButtonText", "Load chart", canvas );<h3>Assets attribution</h3>

htm#query=minimal%20charts&position=3&from_view=search&track=ais] on Freepik

htm#query=eco%20green&position=31&from_view=search&track=ais]

WordPress.org metadata

Plugin tags

Topics listed for this plugin in the WordPress.org directory.

  • chartjs
  • charts
  • green
Compatibility & maintenance

Compatibility & maintenance

Tested up to WordPress 6.1

Not yet marked as tested with WordPress 7.1. WordPress.org currently lists Tested up to 6.1.

Current WordPress releaseWordPress 7.1
WordPress.org Tested up to6.1
Minimum requirementsWordPress 5.0 · PHP 7.0
Update activity14 Feb 20233y ago

“Tested up to” is directory metadata supplied by the plugin author. WP PlugIndex does not turn an older declaration into a claim that the plugin is incompatible.

Changes recorded by WP PlugIndex

Recent tracked changes

No tracked version or compatibility changes have been recorded by WP PlugIndex yet.

Tracking & source

WP PlugIndex tracks public WordPress.org directory metadata and records selected version, compatibility and availability changes as they are detected.

Plugin watchlist

Watch this plugin

Sign in to your WP PlugIndex account or create a free account. Free accounts can watch up to 5 plugins and see what changed.

Watch limit

Watchlist limit reached

You have reached your current active watch limit.