If a view does not produce any data rows then it does not make sense to display the chart. Instead, it is useful to provide some default text with the "no results behavior" option in Views.

CommentFileSizeAuthor
#1 visualization-empty-1947876-1.patch585 bytesklausi
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

klausi’s picture

Status: Active » Needs review
FileSize
585 bytes

Here is a patch that switches the 'even empty' configuration of the style plugin to FALSE, so that the no results behavior is able to fire.

mradcliffe’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

Applied patch, refreshed views data cache, and behavior works as expected.

Pierre.Vriens’s picture

Status: Reviewed & tested by the community » Patch (to be ported)

Thank you for the patch, and the review of it. Note the status update I did. Sorry it took so long to get this moving.

Refer to #2042155: Looking for new co-maintainers for what happened.

  • Niremizov committed 0702fb6 on 7.x-1.x
    Issue #1947876 by klausi: Do not display chart if view is empty.
    
Niremizov’s picture

Status: Patch (to be ported) » Fixed

Thx for the patch, but this it is default views behaviour, so just erasing this "'even empty' => FALSE," helps to solve issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.