=== GravityCharts ===
Tags: gravitykit, gravityview, gravity forms, charts, chart.js
Requires at least: 5.2
Tested up to: 6.9.4
Contributors: The GravityKit Team
License: GPL 2
Requires PHP: 7.4.0

Beautifully display your Gravity Forms data in charts.

== Description ==

Beautifully display your Gravity Forms entries in charts. Learn more on [gravitykit.com](https://www.gravitykit.com/products/gravitycharts/).

== Installation ==

1. Upload plugin files to your plugins folder, or install using WordPress' built-in Add New Plugin installer
2. Activate the plugin
3. Follow the instructions

== Changelog ==

= 1.18.1 on March 27, 2026 =

* Fixes fatal error on activation introduced in 1.18.

= 1.18 on March 26, 2026 =

This update improves conditional logic with better Multiple Forms compatibility, numeric comparisons, and author search.

**Note: GravityCharts now requires PHP 7.4 or newer.**

#### ✨ Improved
* Enhanced Conditional Logic:
  - "Created By" filter now supports searching by username, display name, email, or login;
  - Product and pricing field filters now correctly compare numeric values, ignoring currency formatting;
  - Filters for fields on joined forms (via [Multiple Forms](https://www.gravitykit.com/extensions/multiple-forms/)) now correctly resolve field types and merge tags;
  - Fixed "Approval Status" filter option appearing twice in the dropdown;
  - Fixed CSS scoping to prevent style collisions with other GravityKit products.

#### 🔧 Updated
* [Foundation](https://www.gravitykit.com/foundation/) to version 1.13.0.

= 1.17 on September 25, 2025 =

This release enhances conditional logic and resolves a fatal error when creating chart feeds.

#### ✨ Improved
* Enhanced conditional logic:
  - Added support for using merge tags in text inputs;
  - Added automatic "Currently Logged-in User" options for Populate Anything fields using WordPress users as a source;
  - Fixed errors when using Consent field sub-inputs in conditional logic;
  - Filters using `{user:}` and `{created_by:}` merge tags are now treated as no-match when the user is logged out;
  - Other fixes and improvements.

#### 🐛 Fixed
* Fatal error when creating a chart feed for a form with a Post Category field if GravityView was not active.

#### 🔧 Updated
* [Foundation](https://www.gravitykit.com/foundation/) to version 1.5.0.

= 1.16 on August 28, 2025 =

This release improves conditional logic and fixes a label color issue when using custom palettes with HEX colors.

#### ✨ Improved
* Enhanced conditional logic:
  - Added ability to search fields by "does not contain";
  - Added predefined options (e.g., Today, Tomorrow, etc.) for Date fields;
  - Created By field now support `is empty` and `is not empty` operators;
  - Fixed conditional logic not working with radio button fields and Survey field Likert scales;
  - Other fixes and improvements.

#### 🐛 Fixed
* Custom color palettes using HEX notation (e.g., `#FF0000`) now correctly generate labels based on contrast.

#### 🔧 Updated
* [Foundation](https://www.gravitykit.com/foundation/) to version 1.3.0:
  - New GravityKit global settings for logging configuration (level, type, cleanup schedule, retention);
  - A unified way to display admin notices across all GravityKit products;
  - Performance improvements and bug fixes.

= 1.15.1 on July 3, 2025 =

This release resolves a PHP 8+ fatal error related to non-string labels in chart data.

#### 🐛 Fixed
* Fatal error on PHP 8+ that could occur when chart field or value labels were not provided as strings.

= 1.15 on May 29, 2025 =

This release adds more control over chart data sorting and fixes an issue with hiding empty labels.

#### 🚀 Added
* Chart option to sort data by value, either from lowest to highest or highest to lowest.

#### 🐛 Fixed
* Empty labels were not hidden when "Exclude Empty Labels" was enabled.

= 1.14.3 on April 25, 2025 =

This hotfix resolves a fatal error that occurred when updating the plugin from version 1.14.1 or earlier.

#### 🐛 Fixed
* Fatal error when updating the plugin from version 1.14.1 or earlier.

#### 🔧 Updated
* [Foundation](https://www.gravitykit.com/foundation/) to version 1.2.25.

= 1.14.2 on April 24, 2025 =

This update fixes several compatibility issues with GravityView, resolves display problems with long labels in charts, and fixes warnings and notices triggered by PHP and WordPress 6.8.

#### 🐛 Fixed
* GravityView-related issues:
  - Fatal error when using a GravityCharts widget in a View with a DataTables layout, if the associated chart feed in Gravity Forms had enhanced security disabled;
  - Infinite loading state when combining a GravityCharts widget set to display a static image chart with a View using a DataTables layout;
  - GravityCharts widgets could break when filtering was configured on a View;
  - Field choices from Populate Anything were not displayed in GravityCharts widgets.
* "Undefined array key" PHP warning.
* Long labels could appear twice or fail to display their values correctly on the chart.
* PHP notice in WordPress 6.8 caused by initializing product translations too early.

#### 🔧 Updated
* [Foundation](https://www.gravitykit.com/foundation/) to version 1.2.24.

= 1.14.1 on April 9, 2025 =

This release fixes a bug that caused charts to break when referencing missing or deleted form fields.

#### 🐛 Fixed
* Fatal error when a Chart embedded via shortcode referenced one or more form fields that no longer exist.

= 1.14 on March 27, 2025 =

This update adds new aggregate options and improves chart performance.

#### 🚀 Added
* Minimum and Maximum as aggregate options.
* Enabled regular charts to display aggregates of numeric fields, grouped by a data field's options.

#### ✨ Improved
* Optimized calculation method for significantly faster performance.

#### 💻 Developer Updates
* Added new hooks:
  - `gk/gravitycharts/api/field/input-types` filter to modify the input types available for a field selector in the Charts feed;
  - `gk/gravitycharts/api/query` filter to modify the `GF_Query` object used for a feed;
  - `gk/gravitycharts/api/field/options` filter to modify labels and values for a field;
  - `gk/gravitycharts/api/decimals` filter to modify the maximum number of decimals used in chart values.
* Deprecated `gk/gravitycharts/api/entries` and `gk/gravitycharts/api/batch-size` filters.

= 1.13.1 on February 10, 2025 =

This release resolves issues with conditional logic and GravityCharts block resizing.

#### 🐛 Fixed
* A potential JavaScript conflict that could prevent conditional logic from being configured.
* GravityCharts block (dynamic embed type) wouldn't expand to full width without a set max width or height.

#### 🔧 Updated
* [Foundation](https://www.gravitykit.com/foundation/) to version 1.2.23.

= 1.13 on January 16, 2025 =

This release improves conditional logic functionality and fixes a deprecation notice in Gravity Forms 2.9.1+.

#### ✨ Improved
* Enhanced conditional logic:
  - Added ability to define custom filter values when using the `has ANY of` or `has ALL of` operators;
  - Added support for merge tag processing in filters with multiple values;
  - Fixed an issue where a missing filter value, when combined with the `has ANY of` or `has ALL of` operators, caused the user interface to break.

#### 🐛 Fixed
* Deprecation notice in Gravity Forms 2.9.1 or newer caused by the use of the `GFFormsModel::matches_operation()` method.

#### 🔧 Updated
* [Foundation](https://www.gravitykit.com/foundation/) to version 1.2.22.

= 1.12.1 on December 5, 2024 =

This hotfix resolves an issue introduced in the previous release that affected theme customizer functionality.

#### 🐛 Fixed
* JavaScript errors that prevented the theme customizer from loading properly.

= 1.12 on December 3, 2024 =

This release adds a simple way to access all chart feeds from the GravityKit menu and introduces new customization options for the GravityCharts block and View widget.

#### 🚀 Added
* "All Charts" menu under GravityKit to conveniently access and filter all chart feeds in one place.
* An option for the GravityCharts widget in the View editor to display either static images or dynamic, interactive charts.
* Block options to configure the minimum and maximum height for dynamic and static charts.

= 1.11 on November 11, 2024 =

This release introduces new chart options, improves conditional logic, and fixes several issues, including a non-critical PHP notice in WordPress 6.7 and newer.

#### 🚀 Added
* Option to show overlapping labels, which were previously hidden by default.
* Option to hide labels that have no value.

#### ✨ Improved
* Enhanced conditional logic:
  - Added support for `is empty` and `is not empty` operators for fields with predefined choices;
  - Introduced a new option to specify a custom value for the `contains` operator when fields have predefined choices;
  - General bug fixes.

#### 🐛 Fixed
* Numeric values stored as currency were not calculated properly.
* Special characters (like an ampersand (&)) were not displayed properly in labels.
* PHP notice in WordPress 6.7 caused by initializing product translations too early.

#### 🔧 Updated
* [Foundation](https://www.gravitykit.com/foundation/) to version 1.2.21.

#### 💻 Developer Updates
* Added new hooks:
  - `gk/gravitycharts/api/js/response` filter to modify the response object before it is turned into a JSON string;
  - `gk/gravitycharts/api/js/json` filter to modify the JSON string before it is returned;
  - `gk/gravitycharts/api/chart/description` filter to modify the description template;
  - `gk/gravitycharts/api/chart/options` filter to modify the description options;
  - `gk/gravitycharts/api/chart/data` filter to modify the data object.

= 1.10 on October 14, 2024 =

This release adds support for the Multiple Choice field (Gravity Forms 2.9+), fixes bugs, and updates internal components.

#### 🚀 Added
* Support for the new Multiple Choice field introduced in Gravity Forms 2.9.

#### 🐛 Fixed
* Fatal error when rendering a View that uses a GravityCharts widget.
* Entries with a field value of `0`, despite it being a valid choice, were not included in the chart.
* PHP 8.1 deprecation notices.
* Block CSS classes were not correctly applied when embedding a chart as an image.

#### 🔄 Updated
* [Foundation](https://www.gravitykit.com/foundation/) to version 1.2.19.

= 1.9 on July 8, 2024 =

This release fixes a JavaScript bug, enhances security, and updates internal components for better performance and compatibility.

#### 🐛 Fixed
* JavaScript error when displaying GravityCharts feeds.

#### 🔐 Security
* Enhanced security by adding a secret attribute to the Chart shortcode.

#### 🔄 Updated
* [Foundation](https://www.gravitykit.com/foundation/) to version 1.2.16.
  - Added an option to subscribe to GravityKit's newsletter from the Manage Your Kit screen.
  - Added a setting in GravityKit > Settings > GravityKit to specify the GravityKit menu position in the Dashboard.
  - Improved internal check for product updates that could still interfere with third-party plugin updates. Thanks, Aaron!
  - Fixed a bug that prevented WordPress from loading third-party plugin translations after their updates. Thanks, Jérôme!
  - Success message now shows correct product name after activation/deactivation.
  - Optimized performance.

= 1.8 on April 24, 2024 =

This release enhances the conditional logic functionality in chart feeds and updates internal components for better performance and compatibility.

#### 🚀 Added
* Ability to nest conditional logic filters and to filter entries based on the current user's role(s).

#### 🔄 Updated
* [Foundation](https://www.gravitykit.com/foundation/) to version 1.2.12.
  - Fixed a bug that hid third-party plugin updates on the Plugins and Updates pages.
  - Resolved a dependency management issue that incorrectly prompted for a Gravity Forms update before activating, installing, or updating GravityKit products.
  - Transients are now set and retrieved correctly when using object cache plugins.
  - Fixed a JavaScript warning that occurred when deactivating license keys and when viewing products without the necessary permissions.
  - Resolved PHP warning messages on the Plugins page.
  - Transients are no longer autoloaded.
  - GravityKit products that are already installed can now be activated without a valid license.
  - Fixed PHP warning messages that appeared when deactivating the last active product with Foundation installed.

= 1.7.5 on January 23, 2024 =

This update addresses issues with chart rendering and date handling, improving both the security and accuracy of the displayed data. It also features an updated version of [Foundation](https://www.gravitykit.com/foundation/) with an important fix for sites using object caching plugins.

#### 🐛 Fixed
* Inactive charts no longer render, enhancing performance and visual clarity.
* An issue where timeline scale dates from a Date field were displayed in the wrong time zone.
* Charts now correctly register all selected options from a Multi Select field, instead of only the last one.
* PHP 8.1+ deprecation notice.

#### 🔄 Updated
* [Foundation](https://www.gravitykit.com/foundation/) was updated to version 1.2.7.
  - Transients are now set and retrieved correctly when using object cache plugins.
  - Fixed a JavaScript warning that occurred when deactivating license keys.

= 1.7.4 on December 19, 2023 =

* Fixed: Conditional logic in GravityCharts feeds causes a fatal error if GravityView is not installed

= 1.7.3 on December 11, 2023 =

* Fixed: GravityCharts feeds now correctly handle relative dates (e.g., "today", "yesterday") in conditional logic configured for date fields

= 1.7.2 on December 8, 2023 =

* Added: Option to duplicate GravityCharts feeds
* Fixed: Timeline scale dates being displayed in the wrong time zone

= 1.7.1 on December 7, 2023 =

* Fixed: Charts populated by Populate Anything could throw an exception
* Fixed: Charts failing to render inside Views and being improperly sized
* Fixed: Issue with aspect ratio sizing when the value is set to 'auto' (default)
* Updated: [Foundation](https://www.gravitykit.com/foundation/) to version 1.2.6

= 1.7 on November 29, 2023 =

* Added: Functionality to set aspect ratio for charts
* Improved: Performance when querying the database for entries on hosts with limited resources
* Fixed: Date picker not working in Conditional Logic
* Fixed: Charts are responsive on window resizing
* Updated: [Foundation](https://www.gravitykit.com/foundation/) to version 1.2.5

__Developer Updates:__

* Added: `gk/gravitycharts/api/batch-size` filter to modify the number of entries fetched from the database at a time

= 1.6 on September 7, 2023 =

* Added: Aggregate entries on timeline charts by year, quarter, month, week, or day (under "Axis" chart settings)
* Added: Chart language (including date labels) are based on the WordPress locale
* Improved: Support for RTL languages
* Fixed: A timeline chart could show an empty required field on the wrong timeline type
* Updated: [Foundation](https://www.gravitykit.com/foundation/) to version 1.2.2

= 1.5.3 on July 12, 2023 =

* Fixed: Fatal error if the multi-input field choice value is empty
* Updated: [Foundation](https://www.gravitykit.com/foundation/) to version 1.1.1

= 1.5.2 on June 29, 2023 =

__Developer Updates:__

* Fixed: Restored the `gk/gravitycharts/color-palettes` filter, which was accidentally removed in version 1.4
* Updated: [Foundation](https://www.gravitykit.com/foundation/) to version 1.1.0

= 1.5.1 on June 5, 2023 =

* Fixed: 20-entry limit for chart data when conditional logic is enabled

= 1.5 on May 23, 2023 =

* Improved: Chart legends now work with Bar/Column chart types

__Developer Updates:__

* Upgraded: Chart.js from Version 4.1 to 4.3

= 1.4 on May 11, 2023 =

* Added: [Plot data on a timeline](https://docs.gravitykit.com/article/929-plotting-data-against-time) with the new "Data Type" setting (available on Bar/Column and Line/Area chart types)
	- Display entry count, plot average values, or chart summed values
	- Yes, this supports pricing fields!
	- Yes, you can chart the number of entries submitted per day!
* Added: Chart labels can now be displayed above or next to charted values ([learn how to configure labels](https://docs.gravitykit.com/article/930-adding-labels-to-a-chart))
	- Configure labels in a new "Labels" chart configuration panel
 	- Choose what is shown (value, label, or percentage)
	- Define the position of labels (default, border, outside)
	- Set the label font size and colors
* Added: Chart values of a single entry
	- Show on a form confirmation page by adding a [`{gravitycharts}` merge tag](https://docs.gravitykit.com/article/857-gravitycharts-merge-tag) to the form confirmation text and including `entry=true` in the merge tag
	- Add `entry=<entry ID>` to the [`[gravitycharts]` shortcode](https://docs.gravitykit.com/article/850-gravitycharts-shortcode)
* Added: Ability to switch the area fill type for a line or radar chart using the Design panel "Area Fill" setting
* Improved: Keyboard focus is trapped inside active configuration dialog for accessibility
* Improved: Polar Area charts can now have a gap between segments
* Modified: Chart configuration is hidden until a data source is selected
* Fixed: Auto Scale setting was not parsed properly
* Fixed: A merge tag without attributes could throw an exception
* Fixed: Dynamic fields that use [GP Populate Anything](https://gravitywiz.com/documentation/gravity-forms-populate-anything/?ref=263) are now supported
* Fixed: Incompatibility with some plugins/themes that use Laravel components

__Developer Updates:__

* Added: `gk/gravitycharts/api/label-width` filter to split long labels into multiple lines
* Updated: [Foundation](https://www.gravitykit.com/foundation/) to version 1.0.12
* Upgraded: Chart.js to 4.1

= 1.3.5 on February 20, 2023 =

**Note: GravityCharts now requires PHP 7.2 or newer**

* Updated: [Foundation](https://www.gravitykit.com/foundation/) to version 1.0.9

= 1.3.4 on January 5, 2023 =

* Updated: [Foundation](https://www.gravitykit.com/foundation/) to version 1.0.8

= 1.3.3 on December 21, 2022 =

* Fixed: PHP 8.1 notices
* Fixed: Fatal error on some hosts due to a conflict with one of the plugin dependencies (psr/log)

= 1.3.2 on December 1, 2022 =

* Fixed: It was not possible to remove an expired license key

= 1.3.1 on November 29, 2022 =

* Added: Block shows information on adding a feed when no forms are available
* Fixed: Chart autoscaling not working properly
* Fixed: "Undefined index" PHP notice
* Fixed: Fatal error when loading plugin translations
* Fixed: Slow loading times on some hosts
* Fixed: Plugin failing to install on some hosts

= 1.3.0.1 on November 1, 2022 =

* Fixed: Plugin was not appearing in the "Add-Ons" section of the Gravity Forms System Status page

= 1.3 on October 24, 2022 =

* Added: New WordPress admin menu where you can now centrally manage all your GravityKit product licenses and settings ([learn more about the new GravityKit menu](https://www.gravitykit.com/foundation/))
    - Go to the WordPress sidebar and check out the GravityKit menu!
    - We have automatically migrated your existing GravityCharts license, which was previously entered in the Gravity Forms settings page
    - Request support using the "Grant Support Access" menu item
* Fixed: Charts were including entries from the trash and spam folders
* Fixed: Prevent JavaScript and CSS files from loading on every page

= 1.2.0.2 on August 23, 2022 =

* Fixed: Fatal error introduced in GravityCharts 1.2 related to Merge Tags

= 1.2.0.1 on August 19, 2022 =

* Fixed: Fatal error and PHP notices introduced in GravityCharts 1.2 related to Merge Tags

= 1.2 on August 17, 2022 =

* Added: Image charts! Embed images of your charts anywhere Merge Tags or shortcodes are allowed, including email confirmations. **This feature is in beta and may not work properly.** Please [report any issues to support@gravitykit.com](mailto:support@gravitykit.com).
	- Embed image charts in Gravity Forms Confirmations and Notifications using Merge Tags — [Learn more about the `{gravitycharts}` Merge Tag](https://docs.gravitykit.com/article/857-gravitycharts-merge-tag)
	- Added `embed_type` parameter to the `[gravitycharts]` shortcode – [See the shortcode docs](https://docs.gravitykit.com/article/850-gravitycharts-shortcode)

__Developer Notes:__

* Added: `gk/gravitycharts/image-charts/quickchart/instance` action to modify the QuickChart instance before rendering — [See the hook and code examples](https://docs.gravitykit.com/article/855-customizing-image-charts)

= 1.1.1 on July 14, 2022 =

* Fixed: Fatal error when embedding an incorrectly-formatted `[gravitycharts]` shortcode without any parameters

= 1.1 on July 7, 2022 =

* Added: `[gravitycharts]` shortcode to embed charts in a post/page (e.g., `[gravitycharts id="5"]`)
* Fixed: Fatal error on Gravity Forms ≤2.5.10 when using a non-checkbox field as the data source

= 1.0.4 on June 29, 2022 =

* Fixed: Multiple charts embedded in a post/page would get duplicated
* Fixed: When multiple charts using conditional logic are included in a GravityView View via a widget, only the first chart would display the correct data
* Fixed: It was not possible to set the maximum scale value for the Line/Area chart type

= 1.0.3 on May 30, 2022 =

* Fixed: GravityView charts widget would not display when the View is embedded in a page/post
* Fixed: Fatal error due to double initialization of the GravityCharts Gutenberg block
* Improved: GravityView charts widget admin scripts are only loaded in the View editor

= 1.0.2 on May 18, 2022 =

__Developer Updates:__

* Added: `gk/gravitycharts/capabilities/access` filter to control user capability required to access the plugin

= 1.0.1 on May 16, 2022 =

Fixed: Fatal error when GravityView is not installed

= 1.0 on May 10, 2022 =

* Liftoff! 🚀
