a grouped view breaks the charts here.
with a result set of 3 groups i get 6 (bar) charts like so:
1
1
1
2
2
3

which is not what is wanted.

Comments

geek-merlin’s picture

background research:
below each table there is some javascript like so:

$(".myview_table-page_1-graph").visualize(Drupal.settings.jqueryVisualize['rake_table-page_1']);

the class that is selected is the same for all grouping tables though, so all groupng tables are selected and given to the visualize handler. (i don't understand though why we don't get 3x3 charts)

geek-merlin’s picture

i see following options to resolve this bug:
(1) change classname to be unique for each grouping table
(2) change selector (in js above) to only select one table
(3) move js to a central place

geek-merlin’s picture

fix-for-now:
although option (3) would be cleanes imho, here is a quick and dirty implementation for (2). this is not elegant as it relies on the caption and it WILL break if one group caption is a proper substring of another.

but works for me for now ;-)

in views-view-jquery-visualize.tpl.php
change line 57 to

  $(".<?php print $view_name.'-'.$current_display.'-graph:has(caption):contains('.$title.')'; ?>").visualize(Drupal.settings.jqueryVisualize['<?php print $view_name.'-'.$current_display?>']);