This WordPress plugin allows you to easily add interactive charts to your website, using data from the global-warming.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.
Once the plugin is installed and configured, you can add chart shortcodes to your pages and posts. The available shortcodes are:
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.
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.
If you would like to contribute to the development of this plugin, please fork the repository and submit a pull request.
This plugin is provided “as is” without warranty of any kind, either express or implied. Global warming.org and ChartJs library do not endorse this plugin and are not responsible for any damages or losses that may result from its use.
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); Remember to use wp.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.
globalHooks.applyFilters("greencharts_js_chartConfig", chartConfig, canvas); // usage example: wp.hooks.addFilter( "greencharts_js_chartConfig", "defaultHooks", (chartConfig, canvas) => { console.log("THEME FILTER", chartConfig, canvas.dataset.type); chartConfig.data.datasets[0].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.
globalHooks.applyFilters("greencharts_js_debug", false), // usage example: wp.hooks.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.
globalHooks.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.
options.globalHooks.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.
options.globalHooks.applyFilters( "greencharts_js_loadButtonText", "Load chart", canvas );<h3>Assets attribution</h3>
– Image by (rawpixel.com)[https://www.freepik.com/free-vector/social-media-analysis-design-graphs_16323246.htm#query=minimal%20charts&position=3&from_view=search&track=ais] on Freepik
– Image by (Freepik)[https://www.freepik.com/free-vector/green-energy-buildings_713297.htm#query=eco%20green&position=31&from_view=search&track=ais]
Starting from $0 per month.
Rating
Reviewers
No reviews
Tags
Developed By
mbaroncini
Quick & Easy
Common Ninja has a large selection of powerful Wordpress plugins that are easy to use, fully customizable, mobile-friendly and rich with features — so be sure to check them out!
Testimonial plugins for Wordpress
Galleries plugins for Wordpress
SEO plugins for Wordpress
Contact Form plugins for Wordpress
Forms plugins for Wordpress
Social Feeds plugins for Wordpress
Social Sharing plugins for Wordpress
Events Calendar plugins for Wordpress
Sliders plugins for Wordpress
Analytics plugins for Wordpress
Reviews plugins for Wordpress
Comments plugins for Wordpress
Portfolio plugins for Wordpress
Maps plugins for Wordpress
Security plugins for Wordpress
Translation plugins for Wordpress
Ads plugins for Wordpress
Video Player plugins for Wordpress
Music Player plugins for Wordpress
Backup plugins for Wordpress
Privacy plugins for Wordpress
Optimize plugins for Wordpress
Chat plugins for Wordpress
Countdown plugins for Wordpress
Email Marketing plugins for Wordpress
Tabs plugins for Wordpress
Membership plugins for Wordpress
popup plugins for Wordpress
SiteMap plugins for Wordpress
Payment plugins for Wordpress
Coming Soon plugins for Wordpress
Ecommerce plugins for Wordpress
Customer Support plugins for Wordpress
Inventory plugins for Wordpress
Video Player plugins for Wordpress
Testimonials plugins for Wordpress
Tabs plugins for Wordpress
Social Sharing plugins for Wordpress
Social Feeds plugins for Wordpress
Slider plugins for Wordpress
Reviews plugins for Wordpress
Portfolio plugins for Wordpress
Membership plugins for Wordpress
Forms plugins for Wordpress
Events Calendar plugins for Wordpress
Contact plugins for Wordpress
Comments plugins for Wordpress
Analytics plugins for Wordpress
Common Ninja Apps
Browse our extensive collection of compatible plugins, and easily embed them on any website, blog, online store, e-commerce platform, or site builder.
Show social proof that displays real user activity to build trust instantly, boost credibility, and help increase conversions across your site.
Offer customers a trusted way to pay using PayPal through a PayPal Button that reduces checkout friction and supports higher sales.
Create business listings with a listings widget that presents companies clearly, supports easy organization, and helps visitors find the right services quickly.
Use event flip cards to highlight upcoming activities, improve visibility, and help visitors discover events that increase attendance and engagement.
Show products, apps, or designs inside a clean device mockup that improves visualization, builds credibility, and helps visitors make confident decisions.
Add a translation widget to your site so users can switch languages easily and access content in their preferred language.
Add interactive video overlays with links, product cards, and buttons that appear on top of your videos to boost engagement and guide user actions.
Present images in a Slideshow carousel that rotates or slides through visuals, helping you highlight key content within a clean, engaging layout.
Show Threads posts in a live feed that keeps content fresh, builds social proof, and helps visitors engage on your site.
Use wake up notifications to re-engage visitors with custom alerts that capture attention, boost interaction, and help increase conversions across your site.
Use a Cookie Banner to inform visitors about cookies on your site and let them manage their consent in a clear, structured way.
Create a course registration form that lets students sign up for your classes, saves every submission, and sends you a notification for each new enrollment.
More plugins
The Common Ninja Search Engine platform helps website builders find the best site widgets, apps, plugins, tools, add-ons, and extensions! Compatible with all major website building platforms - big or small - and updated regularly, our Search Engine tool provides you with the business tools your site needs!
