Chart legend - hide/unhide on click #1101
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes AAP-32262
When clicking on the legend of a Chart (in the Reports section),
clicking a field should hide it / unhide it
But, it didn't work,
hasOwnProperty
returns a bool, not the id value we need to filter by=> replacing with the actual id value, stringified. Works now 😅
Testing:
https://stage.foo.redhat.com:1337/ansible/automation-analytics/reports?allReports.description=&allReports.limit=20&allReports.name[]&allReports.offset=0&allReports.selected_report=changes_made_by_job_template&allReports.slug[]&allReports.sort_options=name&allReports.sort_order=asc&allReports.tags[]&default.attributes[]=host_count,changed_host_count,host_task_count,host_task_changed_count&default.cluster_id[]&default.end_date&default.granularity=monthly&default.group_by=template&default.group_by_time=true&default.inventory_id[]&default.job_type[]&default.limit=6&default.offset=0&default.org_id[]&default.quick_date_range=last_year&default.sort_options=changed_host_count&default.sort_order=desc&default.start_date&default.status[]&default.template_id[]&settings.chartSeriesHiddenProps[]=112885&settings.offset=0
click on a field in the legend, see it get hidden/unhidden 🎉